@@ -77,19 +77,19 @@ |
||
77 | 77 | |
78 | 78 | /** @var NodeBuilder $rootNode */ |
79 | 79 | $config->scalarNode('target') |
80 | - ->info('Target node to properly paginate. If is possible will be auto-resolved using naming conventions') |
|
81 | - ->isRequired(); |
|
80 | + ->info('Target node to properly paginate. If is possible will be auto-resolved using naming conventions') |
|
81 | + ->isRequired(); |
|
82 | 82 | $config->variableNode('filters') |
83 | - ->info('Filters configuration'); |
|
83 | + ->info('Filters configuration'); |
|
84 | 84 | $config->variableNode('order_by'); |
85 | 85 | $config->variableNode('search_fields'); |
86 | 86 | $config->integerNode('limit')->info('Max number of records allowed for first & last')->defaultValue($this->limit); |
87 | 87 | $config->scalarNode('parent_field') |
88 | - ->info('When is used in sub-fields should be the field to filter by parent instance'); |
|
88 | + ->info('When is used in sub-fields should be the field to filter by parent instance'); |
|
89 | 89 | $config->enumNode('parent_relation') |
90 | - ->info('When is used in sub-fields should be the type of relation with the parent field') |
|
91 | - ->defaultValue(self::ONE_TO_MANY) |
|
92 | - ->values([self::ONE_TO_MANY, self::MANY_TO_MANY]); |
|
90 | + ->info('When is used in sub-fields should be the type of relation with the parent field') |
|
91 | + ->defaultValue(self::ONE_TO_MANY) |
|
92 | + ->values([self::ONE_TO_MANY, self::MANY_TO_MANY]); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -84,12 +84,12 @@ |
||
84 | 84 | ); |
85 | 85 | $config->variableNode('options')->defaultValue([])->info('Form options'); |
86 | 86 | $config->variableNode('argument') |
87 | - ->defaultValue('input') |
|
88 | - ->info('Name of the argument to use as input'); |
|
87 | + ->defaultValue('input') |
|
88 | + ->info('Name of the argument to use as input'); |
|
89 | 89 | |
90 | 90 | $config->booleanNode('client_mutation_id') |
91 | - ->defaultTrue() |
|
92 | - ->info('Automatically add a field called clientMutationId'); |
|
91 | + ->defaultTrue() |
|
92 | + ->info('Automatically add a field called clientMutationId'); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -19,8 +19,7 @@ |
||
19 | 19 | Can susbribe to a service using something like: |
20 | 20 | |
21 | 21 | new EventSource(subscription.url) |
22 | - |
|
23 | -**NOTE:** A subscription have a tll (Time to live), you must call a periodic request (heartbeat) to |
|
22 | + **NOTE:** A subscription have a tll (Time to live), you must call a periodic request (heartbeat) to |
|
24 | 23 | the `heartbeatUrl` in order to keep-alive the subscription. Otherwise the subscription will be not available |
25 | 24 | after the specified ttl. |
26 | 25 | ") |
@@ -52,12 +52,12 @@ |
||
52 | 52 | 'resolveField' => function ($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($definition) { |
53 | 53 | $resolver = new ObjectFieldResolver($this->container); |
54 | 54 | $context = ContextBuilder::create($context->getEndpoint()) |
55 | - ->setRoot($root) |
|
56 | - ->setResolveInfo($resolveInfo) |
|
57 | - ->setArgs($args) |
|
58 | - ->setMetas($context->getMetas()) |
|
59 | - ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
60 | - ->build(); |
|
55 | + ->setRoot($root) |
|
56 | + ->setResolveInfo($resolveInfo) |
|
57 | + ->setArgs($args) |
|
58 | + ->setMetas($context->getMetas()) |
|
59 | + ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
60 | + ->build(); |
|
61 | 61 | |
62 | 62 | |
63 | 63 | return $resolver($root, $args, $context, $resolveInfo); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | protected function configure() |
58 | 58 | { |
59 | 59 | $this->setName('graphql:subscriptions:consume') |
60 | - ->setDescription('Listen for subscriptions to consume then and dispatch to mercure HUB.'); |
|
60 | + ->setDescription('Listen for subscriptions to consume then and dispatch to mercure HUB.'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -136,12 +136,12 @@ |
||
136 | 136 | |
137 | 137 | if ($resolver && $refMethod) { |
138 | 138 | $this->context = ContextBuilder::create($context->getEndpoint()) |
139 | - ->setRoot($root) |
|
140 | - ->setResolveInfo($resolveInfo) |
|
141 | - ->setArgs($args) |
|
142 | - ->setMetas($context->getMetas()) |
|
143 | - ->setDefinition($this->executableDefinition) |
|
144 | - ->build(); |
|
139 | + ->setRoot($root) |
|
140 | + ->setResolveInfo($resolveInfo) |
|
141 | + ->setArgs($args) |
|
142 | + ->setMetas($context->getMetas()) |
|
143 | + ->setDefinition($this->executableDefinition) |
|
144 | + ->build(); |
|
145 | 145 | |
146 | 146 | if ($resolver instanceof ResolverInterface) { |
147 | 147 | $resolver->setContext($this->context); |
@@ -88,12 +88,12 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $context = ContextBuilder::create($context->getEndpoint()) |
91 | - ->setArgs($args) |
|
92 | - ->setRoot($root) |
|
93 | - ->setDefinition($queryDefinition) |
|
94 | - ->setResolveInfo($info) |
|
95 | - ->setMetas($context->getMetas()) |
|
96 | - ->build(); |
|
91 | + ->setArgs($args) |
|
92 | + ->setRoot($root) |
|
93 | + ->setDefinition($queryDefinition) |
|
94 | + ->setResolveInfo($info) |
|
95 | + ->setMetas($context->getMetas()) |
|
96 | + ->build(); |
|
97 | 97 | |
98 | 98 | $resolver = new ResolverExecutor($this->container, $queryDefinition); |
99 | 99 | $value = $resolver($root, $args, $context, $info); |
@@ -52,12 +52,12 @@ |
||
52 | 52 | 'resolveField' => function ($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($definition) { |
53 | 53 | $resolver = new ObjectFieldResolver($this->container); |
54 | 54 | $context = ContextBuilder::create($context->getEndpoint()) |
55 | - ->setRoot($root) |
|
56 | - ->setResolveInfo($resolveInfo) |
|
57 | - ->setArgs($args) |
|
58 | - ->setMetas($context->getMetas()) |
|
59 | - ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
60 | - ->build(); |
|
55 | + ->setRoot($root) |
|
56 | + ->setResolveInfo($resolveInfo) |
|
57 | + ->setArgs($args) |
|
58 | + ->setMetas($context->getMetas()) |
|
59 | + ->setDefinition($definition->getField($resolveInfo->fieldName)) |
|
60 | + ->build(); |
|
61 | 61 | |
62 | 62 | |
63 | 63 | return $resolver($root, $args, $context, $resolveInfo); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if ($config['graphiql']['authentication']['provider']['lexik_jwt']['enabled'] ?? false) { |
106 | 106 | $providerName = sprintf('security.user.provider.concrete.%s', $config['graphiql']['authentication']['provider']['lexik_jwt']['user_provider']); |
107 | 107 | $container->getDefinition(LexikJWTGraphiQLAuthenticator::class) |
108 | - ->setArgument(1, new Reference($providerName)); |
|
108 | + ->setArgument(1, new Reference($providerName)); |
|
109 | 109 | } else { |
110 | 110 | $container->removeDefinition(LexikJWTGraphiQLAuthenticator::class); |
111 | 111 | } |
@@ -114,14 +114,14 @@ discard block |
||
114 | 114 | |
115 | 115 | //build the ID encoder manager with configured encoder |
116 | 116 | $container->getDefinition(IDEncoderManager::class) |
117 | - ->setPublic(true) |
|
118 | - ->replaceArgument(0, new Reference($config['id_encoder'])); |
|
117 | + ->setPublic(true) |
|
118 | + ->replaceArgument(0, new Reference($config['id_encoder'])); |
|
119 | 119 | |
120 | 120 | |
121 | 121 | //endpoint definition |
122 | 122 | $container->getDefinition(GraphQLEndpointController::class) |
123 | - ->addMethodCall('setErrorFormatter', [new Reference($config['error_handling']['formatter'])]) |
|
124 | - ->addMethodCall('setErrorHandler', [new Reference($config['error_handling']['handler'])]); |
|
123 | + ->addMethodCall('setErrorFormatter', [new Reference($config['error_handling']['formatter'])]) |
|
124 | + ->addMethodCall('setErrorHandler', [new Reference($config['error_handling']['handler'])]); |
|
125 | 125 | |
126 | 126 | $bundles = $container->getParameter('kernel.bundles'); |
127 | 127 | if (isset($bundles['MercureBundle'])) { |
@@ -130,19 +130,19 @@ discard block |
||
130 | 130 | $mercurePublisherReference = new Reference(sprintf('mercure.hub.%s.publisher', $mercureHub)); |
131 | 131 | |
132 | 132 | $container->getDefinition(SubscriptionManager::class) |
133 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
134 | - ->addArgument(new Parameter('kernel.secret')); |
|
133 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
134 | + ->addArgument(new Parameter('kernel.secret')); |
|
135 | 135 | |
136 | 136 | $container->getDefinition(SubscriptionsController::class) |
137 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
138 | - ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
137 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
138 | + ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
139 | 139 | |
140 | 140 | $container->getDefinition(SubscriptionsHeartbeatController::class) |
141 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
142 | - ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
141 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
142 | + ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
143 | 143 | |
144 | 144 | $container->getDefinition(SubscriptionConsumerCommand::class) |
145 | - ->addArgument($mercurePublisherReference); |
|
145 | + ->addArgument($mercurePublisherReference); |
|
146 | 146 | |
147 | 147 | $container->getDefinition(GraphQLEndpointController::class)->addMethodCall('setPublisher', [$mercurePublisherReference]); |
148 | 148 | } else { |