Multiple Endpoints
BowlingX opened this issue · 1 comments
BowlingX commented
Is it possible to support multiple endpoints with different schemas in a single Application?
I think this is similar to #14. Composing a schema can be solved already with DI tags and manual merging in the schema class, but independent endpoints for multiple bundles in the same symfony application is not possible right now.
geotry commented
Yes you can, I don't know if it's the right way to do it but it works for me:
/**
* @Route("/graphql/public")
*/
public function graphqlPublicAction(Request $request)
{
$this->container->set('graphql.schema', new PublicSchema());
return $this->forward('GraphQLBundle:GraphQL:default', [], $request->request->all());
}