You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[STARTED] Parse Configuration
[SUCCESS] Parse Configuration
[STARTED] Generate outputs
[STARTED] Generate to ./src/graphql/types.ts
[STARTED] Load GraphQL schemas
[FAILED]
[FAILED] Failed to load schema from ./src/graphql/schema/**/*.ts:
[FAILED]
[FAILED] Unknown type: "string".
[FAILED] Error: Unknown type: "string".
[FAILED] at getNamedType (/Your/project/folder/node_modules/graphql/utilities/extendSchema.js:427:13)
[FAILED] at getWrappedType (/Your/project/folder/node_modules/graphql/utilities/extendSchema.js:442:12)
[FAILED] at buildFieldMap (/Your/project/folder/node_modules/graphql/utilities/extendSchema.js:483:17)
[FAILED] at fields (/Your/project/folder/node_modules/graphql/utilities/extendSchema.js:672:25)
[FAILED] at resolveObjMapThunk (/Your/project/folder/node_modules/graphql/type/definition.js:504:40)
[FAILED] at defineFieldMap (/Your/project/folder/node_modules/graphql/type/definition.js:766:20)
[FAILED] at GraphQLObjectType._fields (/Your/project/folder/node_modules/graphql/type/definition.js:691:26)
[FAILED] at GraphQLObjectType.getFields (/Your/project/folder/node_modules/graphql/type/definition.js:710:27)
[FAILED] at collectReferencedTypes (/Your/project/folder/node_modules/graphql/type/schema.js:387:51)
[FAILED] at new GraphQLSchema (/Your/project/folder/node_modules/graphql/type/schema.js:174:9)
[FAILED]
[FAILED] GraphQL Code Generator supports:
[FAILED] - ES Modules and CommonJS exports (export as default or named export "schema")
[FAILED] - Introspection JSON File
[FAILED] - URL of GraphQL endpoint
[FAILED] - Multiple files with type definitions (glob expression)
[FAILED] - String in config file
[FAILED]
[FAILED] Try to use one of above options and run codegen again.
[FAILED]
[FAILED]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My schema is using a glob expression:
"./src/graphql/schema/**/*.ts"
After run the codegen, I got the error:
Unknown type: "string".
I want to find which file occur the error but it's hard to.
Currently I search the keyword to find.
I want to know is there have better way to find the error file path easily?
Can
Codegen
show the file path directly?Thanks for help!
Config:
Log:
Beta Was this translation helpful? Give feedback.
All reactions