getSchema() public method

public getSchema ( ) : AbstractSchema
return Youshido\GraphQL\Schema\AbstractSchema
コード例 #1
0
ファイル: Reducer.php プロジェクト: youshido/graphql
 /**
  * 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
ファイル: Processor.php プロジェクト: youshido/graphql-bundle
 /**
  * @inheritdoc
  */
 public function __construct(ExecutionContextInterface $executionContext)
 {
     $this->executionContext = $executionContext;
     parent::__construct($executionContext->getSchema());
 }