We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
null
@graphql-codegen/visitor-plugin-common
Using config for enums like:
enumValues: { ReviewStatus: { { PREVIEW: 'preview', FULL: 'full', DISCARDED: 'discarded', } } }
generates a resolver type for the enum of type null. E.g.
// ... export type ResolverTypes = { // ... ReviewStatus: null; // ... }
I suspect this commit is the culprit and that the logic should probably be something like
const isExternalFile = !!this.config.enumValues[typeName].sourceFile; prev[typeName] = isExternalFile ? this.convertName(this.config.enumValues[typeName].typeIdentifier, { useTypesPrefix: false, useTypesSuffix: false, }) : (this.config.enumValues[typeName].sourceIdentifier || this.convertName(this.config.enumValues[typeName].typeIdentifier));
none
See description above
The enum resolverType should be the enum, and not null.
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which packages are impacted by your issue?
@graphql-codegen/visitor-plugin-common
Describe the bug
Using config for enums like:
generates a resolver type for the enum of type
null
. E.g.I suspect this commit is the culprit and that the logic should probably be something like
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
See description above
Expected behavior
The enum resolverType should be the enum, and not null.
Screenshots or Videos
No response
Platform
@graphql-codegen/visitor-plugin-common
version(s): 5.6.0Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: