@@ 352-359 (lines=8) @@ | ||
349 | * |
|
350 | * @return mixed |
|
351 | */ |
|
352 | protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
353 | $root = $config->getRootValue(); |
|
354 | if (is_callable($root)) { |
|
355 | $root = $root($params, $document, $operation); |
|
356 | } |
|
357 | ||
358 | return $root; |
|
359 | } |
|
360 | ||
361 | /** |
|
362 | * @param \GraphQL\Server\ServerConfig $config |
|
@@ 369-376 (lines=8) @@ | ||
366 | * |
|
367 | * @return mixed |
|
368 | */ |
|
369 | protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
370 | $context = $config->getContext(); |
|
371 | if (is_callable($context)) { |
|
372 | $context = $context($params, $document, $operation); |
|
373 | } |
|
374 | ||
375 | return $context; |
|
376 | } |
|
377 | ||
378 | /** |
|
379 | * @param \GraphQL\Server\ServerConfig $config |