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