Skip to content

How best to make the codegen understand a custom directive? #5676

Answered by dotansimha
aprilrd asked this question in Q&A
Discussion options

You must be logged in to vote

I can recommend you to add a transformation layer that would change the schema according to your needs, based on the spec. So @nonNull can change a field to be non-nullable. This can be done with a custom schema loader: https://graphql-code-generator.com/docs/getting-started/schema-field#custom-schema-loader

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@aprilrd
Comment options

@dotansimha
Comment options

@aprilrd
Comment options

Answer selected by dotansimha
Comment options

You must be logged in to vote
2 replies
@darkbasic
Comment options

@jamiter
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants