@@ 422-429 (lines=8) @@ | ||
419 | * |
|
420 | * @return mixed |
|
421 | */ |
|
422 | protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
423 | $root = $config->getRootValue(); |
|
424 | if (is_callable($root)) { |
|
425 | $root = $root($params, $document, $operation); |
|
426 | } |
|
427 | ||
428 | return $root; |
|
429 | } |
|
430 | ||
431 | /** |
|
432 | * @param \GraphQL\Server\ServerConfig $config |
|
@@ 439-446 (lines=8) @@ | ||
436 | * |
|
437 | * @return mixed |
|
438 | */ |
|
439 | protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
440 | $context = $config->getContext(); |
|
441 | if (is_callable($context)) { |
|
442 | $context = $context($params, $document, $operation); |
|
443 | } |
|
444 | ||
445 | return $context; |
|
446 | } |
|
447 | ||
448 | /** |
|
449 | * @param \GraphQL\Server\ServerConfig $config |