Skip to content

Overide existing type #1870

Discussion options

You must be logged in to vote

Answered in Slack, but posting here so it is also public:

It is possible to extend existing types using the GraphQL extend keyword, as described here. However, it's not possible to change an existing field.

A solution to your use-case could be to define a custom mutation, which allows you to specify exactly what the input should be. You can then override the existing registerCustomerAccount mutation with a custom resolver implementation that throws an error, so that people can only use your new custom mutation to register an account.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Romain-Devillez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants