Getting started with a framework compatible with container-interop/service-provider
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.
GraphQLite relies on the webonyx/graphql-php library internally. This library plays well with PSR-7 requests and there is a PSR-15 middleware available.
Webonyx/graphql-php library requires a Schema in order to resolve
GraphQL queries. The service provider provides this
Checkout the the service-provider documentation
$container = new Container([
$schema = $container->get(Schema::class);