arthem / graphql-mapper-bundle
The GraphQL Mapper Symfony Bundle
Package info
github.com/4rthem/graphql-mapper-bundle
Type:symfony-bundle
pkg:composer/arthem/graphql-mapper-bundle
0.0.2
2016-05-20 19:46 UTC
Requires
- php: >=5.4
- arthem/graphql-mapper: *
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is auto-updated.
Last update: 2026-03-01 00:10:15 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.