Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
chou666 opened this issue Aug 10, 2023 · 2 comments
Closed

Comments

@chou666
Copy link

chou666 commented Aug 10, 2023

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

I try to update from 0.15.1 to 1.0.0 (Symfony 5.4.27) with config:

overblog_graphql:
    definitions:
        config_validation: true
        schema:
            query: Query
            mutation: Mutation
            types:
              - <a lot>

When I clear the cache, I have the following error:

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

This error is not present with 0.15.1. An idea ? I see subscription experimental feature, is there a way to disable it ?
Maybe a missing configuration ?

@mcg-web
Copy link
Member

mcg-web commented Oct 2, 2023

Have you got any type named Subscription in your query or mutation schema definition? Can you try adding Subscription to definitions.schema.types ?

@chou666
Copy link
Author

chou666 commented Oct 2, 2023

@mcg-web thanks for the answer.

I define the Subscription type as:

Subscription:
    type: object
    config:
        fields:
            id:
                type: ID!

And no more error. Thanks for your help !

@chou666 chou666 closed this as completed Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants