container-interop/service-provider is an experimental project aiming to bring interoperability between framework module systems.
If your framework is compatible with container-interop/service-provider, GraphQLite comes with a service provider that you can leverage.
Open a terminal in your current project directory and run:
$ composer require thecodingmachine/graphqlite-universal-service-provider
In order to bootstrap GraphQLite, you will need:
- A PSR-16 cache
Additionally, you will have to route the HTTP requests to the underlying GraphQL library.
Webonyx/graphql-php library requires a Schema in order to resolve
GraphQL queries. The service provider provides this
$container = new Container([
$schema = $container->get(Schema::class);
// or if you want the PSR-15 middleware:
$middleware = $container->get(Psr15GraphQLMiddlewareBuilder::class);