@@ 410-417 (lines=8) @@ | ||
407 | * |
|
408 | * @return mixed |
|
409 | */ |
|
410 | protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
411 | $root = $config->getRootValue(); |
|
412 | if (is_callable($root)) { |
|
413 | $root = $root($params, $document, $operation); |
|
414 | } |
|
415 | ||
416 | return $root; |
|
417 | } |
|
418 | ||
419 | /** |
|
420 | * @param \GraphQL\Server\ServerConfig $config |
|
@@ 427-434 (lines=8) @@ | ||
424 | * |
|
425 | * @return mixed |
|
426 | */ |
|
427 | protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
428 | $context = $config->getContext(); |
|
429 | if (is_callable($context)) { |
|
430 | $context = $context($params, $document, $operation); |
|
431 | } |
|
432 | ||
433 | return $context; |
|
434 | } |
|
435 | ||
436 | /** |
|
437 | * @param \GraphQL\Server\ServerConfig $config |