throw 'Nothing here is working';

This commit is contained in:
2020-09-22 19:44:13 +10:00
parent 0d245fdeb6
commit 7982ba92b6
3 changed files with 138 additions and 95 deletions

View File

@@ -1,17 +1,17 @@
/* DOCS: parameter types
/* DOCS: handler parameter types
parent: Type | null
scalars: [{ typeName: String, name: String, filter: any | null }, ...]
matching: Boolean
*/
//BUG: Book { author { name } } - this gives a weird result
const database = require('./database.js');
//the handler routines
const handler = {
//type queries
Author: (parent, scalars, matching) => {
console.log("Author", parent ? parent.context : null);
let authors;
//check parentage
@@ -92,8 +92,6 @@ const handler = {
},
Book: (parent, scalars, matching) => {
console.log("Book", parent ? parent.context : null);
let books;
//check parentage