mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 02:34:28 +11:00
Improved the test
This commit is contained in:
@@ -35,7 +35,8 @@ const sineQL = (schema, { queryHandlers }, options = {}) => {
|
||||
const result = await queryHandlers[queryTree.typeName](queryTree, typeGraph);
|
||||
|
||||
if (options.debug) {
|
||||
console.log('Query tree results:\n', result);
|
||||
console.log('Query tree results:');
|
||||
console.dir(result, { depth: null });
|
||||
}
|
||||
|
||||
return [200, result];
|
||||
|
||||
@@ -35,7 +35,7 @@ const readBlock = (tokens, current, superType, typeGraph, options) => {
|
||||
break;
|
||||
}
|
||||
|
||||
//check for block-level keywords
|
||||
//check for block-level keywords (modifiers need to form a chain from the leaf)
|
||||
let modifier = null;
|
||||
if (['match'].includes(tokens[current - 1])) {
|
||||
modifier = tokens[current - 1];
|
||||
@@ -68,7 +68,8 @@ const readBlock = (tokens, current, superType, typeGraph, options) => {
|
||||
current = pos; //pos points past the end of the block
|
||||
|
||||
if (options.debug) {
|
||||
console.log(`${fieldName}: ${JSON.stringify(result[fieldName])}`);
|
||||
console.log(`${fieldName}:`);
|
||||
console.dir(result[fieldName], { depth: null });
|
||||
}
|
||||
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user