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
gqlg --schemaFilePath ./schema.graphql --destDirPath ./gqlg-new --depthLimit 2
description: Mutation
/usr/local/lib/node_modules/gql-generator/index.js:177
const field = gqlSchema.getType(description).getFields()[type];
^
TypeError: Cannot read property 'getFields' of undefined
at /usr/local/lib/node_modules/gql-generator/index.js:177:49
at Array.forEach (<anonymous>)
at generateFile (/usr/local/lib/node_modules/gql-generator/index.js:176:20)
at Object.<anonymous> (/usr/local/lib/node_modules/gql-generator/index.js:193:3)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11
Then you will see error as shown above cause description filed in index.js get values from the hardcoded list: Query,Mutation,Subscription and doesn't check custom query names.
The text was updated successfully, but these errors were encountered:
Just run into the same issue. Now just added a step to replace RootQueryType with Query and RootMutationType with Mutation in the File and all works fine. Would really be nice to be supported.
Error Example:
If GQL Schema looks like this:
* That's really popular example of schemas.
Then you will see error as shown above cause
description
filed in index.js get values from the hardcoded list:Query,Mutation,Subscription
and doesn't check custom query names.The text was updated successfully, but these errors were encountered: