@@ 437-444 (lines=8) @@ | ||
434 | * |
|
435 | * @return mixed |
|
436 | */ |
|
437 | protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
438 | $root = $config->getRootValue(); |
|
439 | if (is_callable($root)) { |
|
440 | $root = $root($params, $document, $operation); |
|
441 | } |
|
442 | ||
443 | return $root; |
|
444 | } |
|
445 | ||
446 | /** |
|
447 | * @param \GraphQL\Server\ServerConfig $config |
|
@@ 454-461 (lines=8) @@ | ||
451 | * |
|
452 | * @return mixed |
|
453 | */ |
|
454 | protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
455 | $context = $config->getContext(); |
|
456 | if (is_callable($context)) { |
|
457 | $context = $context($params, $document, $operation); |
|
458 | } |
|
459 | ||
460 | return $context; |
|
461 | } |
|
462 | ||
463 | /** |
|
464 | * @param \GraphQL\Server\ServerConfig $config |