graphql-dotnet / graphql-dotnet/conventions
The field 'viewer' of the subscription root type 'Subscription' must have StreamResolver set.
- Dominant language
- C#
- Stars
- 228
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I tried to update our GraphQL packages:
**From:**
GraphQL: 7.2.0
GraphQL.Server.Transports.AspNetCore: 7.1.1
GraphQL.Convetions: 7.0.0
**To:**
GraphQL: 8.2.1
GraphQL.Server.Transports.AspNetCore: 8.2.0
GraphQL.Convetions: 8.0.0
And now I'm seeing the following error, all graphql execution fails.
```
Error executing document. The schema is invalid. See inner exceptions for details. (The field 'viewer' of the subscription root type 'Subscription' must have StreamResolver set.) (The field 'method1' of an Object type 'SubscriptionViewer' must not have StreamResolver set. You should set StreamResolver only for the root fields of subscriptions.) (The field 'method2' of an Object type 'SubscriptionViewer' must not have StreamResolver set. You should set StreamResolver only for the root fields of subscriptions.) (The field 'method3' of an Object type 'SubscriptionViewer' must not have StreamResolver set. You should set StreamResolver only for the root fields of subscriptions.) (The field 'method4' of an Object type 'SubscriptionViewer' must not have StreamResolver set. You should set StreamResolver only for the root fields of subscriptions.)
```
*I censored the field names.
What exactly does this mean? What of the types would you need to see to trace this issue?
Our Root GraphQL Types (Queries, Mutations, Subscriptions) on different services inherit from a base class (which defines some common things). Is this a problem?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.