Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/4rthem/graphql-mapper-bundle


https://github.com/4rthem/graphql-mapper-bundle

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# GraphQL Mapper Bundle

Symfony bundle for [GraphQL Mapper](https://github.com/4rthem/graphql-mapper)

## Installation

This is installable via [Composer](https://getcomposer.org/) as [arthem/graphql-mapper-bundle](https://packagist.org/packages/arthem/graphql-mapper-bundle):

```bash
composer require arthem/graphql-mapper-bundle
```

## Setup / Configuration

Enable the bundle:

```php
See graphql-mapper [documentation](https://github.com/4rthem/graphql-mapper)

Then declare your mapping file in the bundle configuration:

```yaml
# app/config/config.yml

arthem_graphql:
mapping:
files:
- %kernel.root_dir%/config/graphql_schema.yml
```

Setup routing:

```yaml
# 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](LICENSE).