-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using graphql-codegen-factories/operations
fails on this.schema.getRootType
#73
Comments
Could you share a reproduction please? Feel free to use the minimal example as a starting point: https://stackblitz.com/github/zhouzi/graphql-codegen-factories/tree/main/examples/minimal?file=package.json It could come from a specificity in the schema, a graphql version, mixing some plugins together or anything. With a reproduction, it'll be much easier to track down what's going wrong 🙏 |
@jsve are you still having issues using the plugin? It'd be really helpful if you could share a reproduction. |
I am closing this issue but feel free to reopen with more details. |
Same issue with the latest graphql codegen: "@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0", |
And still same: "@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.2.4", Changing to these three instead of preset doesn't work either: "@graphql-codegen/typescript": "4.0.6",
"@graphql-codegen/typescript-operations": "4.2.0",
"@graphql-codegen/typescript-react-apollo": "4.3.0", Looks to me like the format of the schema in the file |
I'll update the versions and see if I can reproduce this bug. |
Running [
'constructor',
'getQueryType',
'getMutationType',
'getSubscriptionType',
'getTypeMap',
'getType',
'getPossibleTypes',
'getImplementations',
'isPossibleType',
'isSubType',
'getDirectives',
'getDirective',
'toConfig'
] |
Thanks for sharing! I suspect the issue is that the plugin doesn't use the same version of the packages as the project. But I will have to run some tests. |
@Cordazar could you share the parts of your package.json that are related to graphql/codegen, please? |
"@graphql-codegen/add": "5.0.2",
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.2.4",
"@graphql-codegen/typescript": "4.0.6",
"@graphql-codegen/typescript-operations": "4.2.0",
"@graphql-codegen/typescript-react-apollo": "4.3.0",
"graphql-codegen-typescript-mock-data": "3.7.1", I've tried it both with the 'typescript',
'typescript-operations',
'typescript-react-apollo',
'graphql-codegen-factories/schema',
'graphql-codegen-factories/operations' |
hello any news on this? |
I am afraid I have not found enough time to track down the issue. Any help is welcomed. |
With plugins as:
I get this error message
[FAILED] this.schema.getRootType is not a function
The text was updated successfully, but these errors were encountered: