First of all, thanks for all the work in GraphQL and GraphQLBundle.
I'm currently trying to inject the Fields into the Schema.
So for that, I can't simply rely on the config graphql.schema_class since the initialization is also needed.
Because of that I've attempted to override the graphql.schema service, and due to the way Symfony works, when there is a duplicated service it ignores/picks one, so since the service is already defined in this services.xml so a compiler pass is needed.
Then I've tried simply to make a compiler pass with:
tl;dr
Can't Change or initialize the
graphql.schema
service even through compiler pass.PR: https://github.com/Youshido/GraphQLBundle/pull/48
Hi
First of all, thanks for all the work in GraphQL and GraphQLBundle.
I'm currently trying to inject the Fields into the Schema. So for that, I can't simply rely on the config
graphql.schema_class
since the initialization is also needed. Because of that I've attempted to override thegraphql.schema
service, and due to the way Symfony works, when there is a duplicated service it ignores/picks one, so since the service is already defined in thisservices.xml
so a compiler pass is needed.Then I've tried simply to make a compiler pass with:
Although even if the service is initialized, there is a class check that will fail since the service is initialized without the class name and initializes the class anyway
Bonus, even if we define the service, we MUST define the schema class which is not relevant.
I am not a Symfony expert, if I'm missing or doing something wrong please tell me.
I'll make a PR for this issue