Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.28 KB

index.md

File metadata and controls

57 lines (43 loc) · 1.28 KB

OverblogGraphQLBundle

This Symfony 2 / 3 bundle provide integration GraphQL using webonyx/graphql-php and GraphQL Relay. It also supports batching using libs like ReactRelayNetworkLayer.

Requirements

PHP >= 5.4

Installation

a) Download the bundle

In the project directory:

composer require overblog/graphql-bundle

b) Enable the bundle

// in app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new Overblog\GraphQLBundle\OverblogGraphQLBundle(),
        ];

        // ...
    }
}

c) Enable GraphQL endpoint

# in app/config/routing.yml
overblog_graphql_endpoint:
    resource: "@OverblogGraphQLBundle/Resources/config/routing/graphql.yml"

d) Enable GraphiQL in dev mode (required twig)

# in app/config/routing_dev.yml
overblog_graphql_graphiql:
    resource: "@OverblogGraphQLBundle/Resources/config/routing/graphiql.yml"

Now you can define your graphQL schema.