youshido-php / GraphQLBundle

Pure PHP implementation of GraphQL Server – Symfony Bundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why schema class and not service?

akomm opened this issue · comments

Being forced to use Symfony\Component\DependencyInjection\ContainerAwareInterface does not feel good. Any reason why no service is used? It is possible to set a default blank Schema at least and give the ability to override the service or just add a definition via compiler pass based on provided config.

We're actually moving towards using Schema through the ExecutionContext which is already a service. Also, you can define your schema as a service by implementing "graphql.schema" service. I'll share an example

Going to check this out thanks