arthem / graphql-mapper-bundle
The GraphQL Mapper Symfony Bundle
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4
- arthem/graphql-mapper: *
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is auto-updated.
Last update: 2024-10-29 04:09:25 UTC
README
Symfony bundle for GraphQL Mapper
Installation
This is installable via Composer as arthem/graphql-mapper-bundle:
composer require arthem/graphql-mapper-bundle
Setup / Configuration
Enable the bundle:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Arthem\Bundle\GraphQLBundle\ArthemGraphQLBundle(), ); // ... } // ... }
Create your schema:
# app/config/graphql_schema.yml # Your schema here
See graphql-mapper documentation
Then declare your mapping file in the bundle configuration:
# app/config/config.yml arthem_graphql: mapping: files: - %kernel.root_dir%/config/graphql_schema.yml
Setup routing:
# app/config/routing.yml arthem_graphql: resource: "@ArthemGraphQLBundle/Resources/config/routing.yml" prefix: /graphql
Usage
Just call POST /app_dev.php/graphql/query
with a "query" in the body
License
Released under the MIT License.