- Remove auto mapping configuration
- Relay Paginator, Connections & Edges
- Remove obsoletes deprecations
- Simplify executor interface
- The AutoMapping configuration entry has been removed in favor of Symfony 4+ service configuration.
Upgrading:
- Delete old configuration.
overblog_graphql: definitions: - auto_mapping: ~
- use Symfony 4+ service configuration to tag your types, resolvers or mutation.
# config/graphql.yaml services: _defaults: autowire: true public: true _instanceof: GraphQL\Type\Definition\Type: tags: ['overblog_graphql.type'] Overblog\GraphQLBundle\Definition\Resolver\ResolverInterface: tags: ['overblog_graphql.resolver'] Overblog\GraphQLBundle\Definition\Resolver\MutationInterface: tags: ['overblog_graphql.mutation'] App\GraphQL\: resource: ../GraphQL
- Following the paginator update and the use of interfaces for Relay Connection & Edge, getters & setters must be use to manipulate Connection, Edge and PageInfo Properties
Before :
$connection->edges = $edges;
$connection->totalCount = 10;
...
$edge->cursor = $cursor;
$edge->node = $node;
After :
$connection->setEdges($edges);
$connection->setTotalCount(10);
...
$edge->setCursor($cursor);
$edge->setNode($node);
Connection builder has been moved and it methods are no more accessible statically:
Before:
use Overblog\GraphQLBundle\Relay\Connection\Output\ConnectionBuilder;
ConnectionBuilder::connectionFromArray([]);
After:
use Overblog\GraphQLBundle\Relay\Connection\ConnectionBuilder;
$connectionBuilder = new ConnectionBuilder();
$connectionBuilder->connectionFromArray([]);
The builder short syntax (Field: Builder => Field: {builder: Builder}) is obsolete:
Foo:
type: object
config:
fields:
- bar: MyBuilder
+ bar: {builder: MyBuilder}
Relay builder without 'Relay::' prefix is obsolete:
Foo:
type: object
config:
fields:
bar:
- argsBuilder: ConnectionArgs
+ argsBuilder: "Relay::Connection"
This section is only for users using custom executor.
The interface move to be look a little be more to GraphQL\GraphQL
promiseToExecute
method.
In Overblog\GraphQLBundle\Executor\ExecutorInterface
setPromiseAdapter
and setDefaultFieldResolver
has been removed.
Promise adapter is now the first argument ($promiseAdapter
)
and default field resolver the 7th argument ($fieldResolver
) of
Overblog\GraphQLBundle\Executor\ExecutorInterface::execute
method.