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