diff --git a/src/__tests__/__testSchema__/query.auth/isLoggedIn.ts b/src/__tests__/__testSchema__/query.auth/isLoggedIn.ts index 598abfa..ed52f3d 100644 --- a/src/__tests__/__testSchema__/query.auth/isLoggedIn.ts +++ b/src/__tests__/__testSchema__/query.auth/isLoggedIn.ts @@ -1,4 +1,4 @@ export default { - type: 'Boolean', + type: (sc) => sc.get('Boolean'), resolve: () => true, }; diff --git a/src/astToSchema.ts b/src/astToSchema.ts index 4aa01d0..01d2c06 100644 --- a/src/astToSchema.ts +++ b/src/astToSchema.ts @@ -224,6 +224,9 @@ function isSomeOutputTypeDefinition(type: any): boolean { } else if (Array.isArray(type)) { // type: ['String'] return isSomeOutputTypeDefinition(type[0]); + } else if (isFunction(type)) { + // pass thunked type without internal checks + return true; } else { // type: 'type User { name: String }' return isComposeOutputType(type);