-
Inherited a couple of JavaScript GraphQL APIs and wanting to migrate them to use Pothos. Best I have managed to do is to make my own export interface QueryFieldBuilder<Types extends SchemaTypes, ParentShape>
extends RootFieldBuilder<Types, ParentShape, 'Query'> {}
export interface MutationFieldBuilder<Types extends SchemaTypes, ParentShape>
extends RootFieldBuilder<Types, ParentShape, 'Mutation'> {}
export interface SubscriptionFieldBuilder<Types extends SchemaTypes, ParentShape>
extends RootFieldBuilder<Types, ParentShape, 'Subscription'> {} Haven't found a good way to work around these hard-coded names. Anyone done anything similar? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Just pushed support for this. If you upgrade, you should be able to specify a Definitely would still be a breaking change, just curious how widespread the impact of this actually is? |
Beta Was this translation helpful? Give feedback.
Just pushed support for this. If you upgrade, you should be able to specify a
name
in the options for your root types. I am curious how your clients would be affected by the rename though. Most queries/responses won't contain the root type names (Most people don't use fragments on the root types, or select the __typename in the root query).Definitely would still be a breaking change, just curious how widespread the impact of this actually is?