Skip to content

Schema name is not part of graphql query after "Custom GraphQL Root Fields" is used on a table #7392

Answered by praveenweb
nizamani asked this question in Question
Discussion options

You must be logged in to vote

@nizamani - This is currently the expected behaviour. When you are using custom GraphQL root fields, Hasura replaces the auto-generated name with exactly what you give as input for the custom field name. So if you would like to retain the schema prefix, currently it needs to be given as part of the input. So your rename to cats will have pets_cats as the actual input.

This is to ensure that in cases where you actually don't want the schema prefix for some reason, you still have total control over what needs to be exposed.

Although I agree that the console UI currently shows the field names without the prefix as a default input placeholder and that might be confusing. It should show the ex…

Replies: 1 comment

Comment options

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