The Symfony Framework Bundle for Railt.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.scrutinizer.yml
LICENSE.md
README.md
composer.json

README.md

Symfony Bundle for Railt

Travis CI Scrutinizer CI Code coverage Latest Stable Version Latest Unstable Version License MIT

About

The Symfony Framework Bundle for Railt.

Installation

Make sure that you are using at least PHP 7.1

  1. composer require railt/symfony-bundle
  2. Add the \Railt\SymfonyBundle\RailtBundle::class into your bundles list.
  3. Add a GraphQL route, like:
app.graphql:
    resource: "@RailtBundle/Resources/config/routing.yml"
    prefix: /graphql

Now you have a GraphQL Server located in http://localhost/graphql/

3.1: Or like this:

app.graphql:
    path: /graphql
    methods: [ 'GET', 'POST', 'PATCH', 'PUT' ]
    defaults:
        _controller: RailtBundle:GraphQL:handle

Now you have a GraphQL Server located in http://localhost/graphql

Configuration

You can configure your application:

railt:
    # Enable or disable the cache and debug mode
    # - Optional
    # - Default: %kernel.debug%
    debug: '%kernel.debug%'

    # Schema file reference
    # - Optional
    # - Default: '@RailtBundle/Resources/graphql/schema.graphqls'
    schema: '@YourBundle/Resources/graphql/schema.graphqls'

    # Directories where railt will try to load missing type files
    # - Optional
    # - Default: []
    autoload:
        - '@YourBundle/Resources/graphql/'
        - '@YourBundle/Resources/graphql/queries/'
        - '@YourBundle/Resources/graphql/mutations/'

    # Names of extensions (string class name)
    # - Optional
    # - Default: []
    extensions: 
        - Some/Extension