getSchema() public method

public getSchema ( ) : AbstractSchema
return Youshido\GraphQL\Schema\AbstractSchema
示例#1
0
 /**
  * Apply all of $reducers to this query.  Example reducer operations: checking for maximum query complexity,
  * performing look-ahead query planning, etc.
  *
  * @param ExecutionContextInterface $executionContext
  * @param AbstractQueryVisitor[]    $reducers
  */
 public function reduceQuery(ExecutionContextInterface $executionContext, array $reducers)
 {
     $this->executionContext = $executionContext;
     $schema = $executionContext->getSchema();
     foreach ($reducers as $reducer) {
         foreach ($executionContext->getRequest()->getAllOperations() as $operation) {
             $this->doVisit($operation, $operation instanceof Mutation ? $schema->getMutationType() : $schema->getQueryType(), $reducer);
         }
     }
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function __construct(ExecutionContextInterface $executionContext)
 {
     $this->executionContext = $executionContext;
     parent::__construct($executionContext->getSchema());
 }