Skip to content

The field 'viewer' of the subscription root type 'Subscription' must have StreamResolver set. #267

@floge07

Description

@floge07

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions