Skip to content

Invalid object name Subscription use .createSubscriptionType() instead #1210

Answered by hayes
PatricioNG asked this question in Q&A
Discussion options

You must be logged in to vote

There isn't anything built into Pothos to work around this. Pothos doesn't currently support re-naming to root types (Query, Mutation, Subscription), which would be a prerequisite to removing that check.

I would recommend avoiding using Subscription as the name in your graphql schema for something other than graphql subscriptions.

The workaround would be to change the name on the built schema, but that's a pretty hacky solution

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PatricioNG
Comment options

Answer selected by PatricioNG
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