Skip to content

Could not find type with alias "Subscription". Did you forget to define it?Β #1139

@jsakars

Description

@jsakars
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Version/Branch 1.0.0

Using latest stable Symfony and this bundle and given the following config/packages/graphql.yaml content:

overblog_graphql:
    definitions:
        schema:
            query: Query
            mutation: Mutation

Symfony profiler shows the following error when trying to access GraphQL section: An exception has been thrown during the rendering of a template ("Could not find type with alias "Subscription". Did you forget to define it?")..

Now with the following config/packages/graphql.yaml content:

overblog_graphql:
    definitions:
        schema:
            query: Query

Symfony profiler shows the following error when trying to access GraphQL section: An exception has been thrown during the rendering of a template ("Could not find type with alias "Mutation". Did you forget to define it?").

It seems that GraphQL profiler expects ALL types (query, mutations, subscription) to be defined even though one might not have some of them (e.g. only the queries).

It seems to work adding some dummy type definition e.g.:

type Subscription {
    id: ID!
}

Is there something missing in the default configuration?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions