GraphQL Start bundle

Refs #2644
pull/2650/head^2
Angel Fernando Quiroz Campos 6 years ago
parent 5e6767b5e1
commit 99bf33b720
  1. 1
      config/bundles.php
  2. 11
      config/packages/graphql.yaml
  3. 3
      config/routes/graphql.yaml
  4. 8
      config/services.yaml
  5. 29
      src/ApiBundle/GraphQL/Mutation/RootMutation.php
  6. 31
      src/ApiBundle/GraphQL/Resolver/RootResolver.php

@ -71,4 +71,5 @@ return [
Ivory\CKEditorBundle\IvoryCKEditorBundle::class => ['all' => true],
Oneup\UploaderBundle\OneupUploaderBundle::class => ['all' => true],
APY\DataGridBundle\APYDataGridBundle::class => ['all' => true],
Overblog\GraphQLBundle\OverblogGraphQLBundle::class => ['all' => true],
];

@ -0,0 +1,11 @@
overblog_graphql:
definitions:
schema:
query: Query
mappings:
auto_discover: false
types:
-
type: yaml
dir: "%kernel.project_dir%/config/graphql/types"
suffix: ~

@ -0,0 +1,3 @@
overblog_graphql_endpoint:
resource: "@OverblogGraphQLBundle/Resources/config/routing/graphql.yml"
prefix: /graphql

@ -41,6 +41,14 @@ services:
arguments:
$debug: '%kernel.debug%'
Chamilo\ApiBundle\GraphQL\Resolver\:
resource: '../src/ApiBundle/GraphQL/Resolver'
tags: ['overblog_graphql.resolver']
Chamilo\ApiBundle\GraphQL\Mutation\:
resource: '../src/ApiBundle/GraphQL/Mutation'
tags: ['overblog_graphql.mutation']
sylius_settings:
driver: doctrine/orm

@ -0,0 +1,29 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\ApiBundle\GraphQL\Mutation;
use Chamilo\CoreBundle\Framework\Container;
use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
use Overblog\GraphQLBundle\Definition\Resolver\MutationInterface;
/**
* Class RootMutation
*
* @package Chamilo\ApiBundle\GraphQL\Mutation
*/
class RootMutation implements MutationInterface, AliasedInterface
{
/**
* Returns methods aliases.
*
* For instance:
* array('myMethod' => 'myAlias')
*
* @return array
*/
public static function getAliases()
{
return [];
}
}

@ -0,0 +1,31 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\ApiBundle\GraphQL\Resolver;
use Chamilo\CoreBundle\Framework\Container;
use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
use Overblog\GraphQLBundle\Definition\Resolver\ResolverInterface;
/**
* Class RootResolver
*
* @package Chamilo\ApiBundle\GraphQL\Resolver
*/
class RootResolver implements ResolverInterface, AliasedInterface
{
/**
* Returns methods aliases.
*
* For instance:
* array('myMethod' => 'myAlias')
*
* @return array
*/
public static function getAliases()
{
return [
];
}
}
Loading…
Cancel
Save