@@ 376-383 (lines=8) @@ | ||
373 | * |
|
374 | * @return mixed |
|
375 | */ |
|
376 | protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
377 | $root = $config->getRootValue(); |
|
378 | if (is_callable($root)) { |
|
379 | $root = $root($params, $document, $operation); |
|
380 | } |
|
381 | ||
382 | return $root; |
|
383 | } |
|
384 | ||
385 | /** |
|
386 | * @param \GraphQL\Server\ServerConfig $config |
|
@@ 393-400 (lines=8) @@ | ||
390 | * |
|
391 | * @return mixed |
|
392 | */ |
|
393 | protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) { |
|
394 | $context = $config->getContext(); |
|
395 | if (is_callable($context)) { |
|
396 | $context = $context($params, $document, $operation); |
|
397 | } |
|
398 | ||
399 | return $context; |
|
400 | } |
|
401 | ||
402 | /** |
|
403 | * @param \GraphQL\Server\ServerConfig $config |