コード例 #1
0
ファイル: NonNullType.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\TypeInterface $type
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(TypeInterface $type, Location $location = NULL)
 {
     if (!($type instanceof NamedType || $type instanceof ListType)) {
         throw new \InvalidArgumentException(sprintf('Invalid type %s.', get_class($type)));
     }
     parent::__construct($location, ['type' => $type]);
 }
コード例 #2
0
ファイル: FloatValue.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param string $value
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct($value, Location $location = NULL)
 {
     parent::__construct($location, ['value' => $value]);
 }
コード例 #3
0
 /**
  * Constructor.
  *
  * @param string $operation
  * @param \Fubhy\GraphQL\Language\Node\Name $name
  * @param \Fubhy\GraphQL\Language\Node\VariableDefinition[] $variableDefinitions
  * @param \Fubhy\GraphQL\Language\Node\Directive[] $directives
  * @param \Fubhy\GraphQL\Language\Node\SelectionSet $selectionSet
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct($operation, Name $name = NULL, array $variableDefinitions = [], array $directives = [], SelectionSet $selectionSet, Location $location = NULL)
 {
     parent::__construct($location, ['operation' => $operation, 'name' => $name, 'variableDefinitions' => $variableDefinitions, 'directives' => $directives, 'selectionSet' => $selectionSet]);
 }
コード例 #4
0
ファイル: InlineFragment.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\NamedType $typeCondition
  * @param \Fubhy\GraphQL\Language\Node\Directive[] $directives
  * @param \Fubhy\GraphQL\Language\Node\SelectionSet $selectionSet
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(NamedType $typeCondition, array $directives = [], SelectionSet $selectionSet, Location $location = NULL)
 {
     parent::__construct($location, ['typeCondition' => $typeCondition, 'directives' => $directives, 'selectionSet' => $selectionSet]);
 }
コード例 #5
0
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\Variable $variable
  * @param \Fubhy\GraphQL\Language\Node\TypeInterface $type
  * @param \Fubhy\GraphQL\Language\Node\ValueInterface $defaultValue
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(Variable $variable, TypeInterface $type, ValueInterface $defaultValue = NULL, Location $location = NULL)
 {
     parent::__construct($location, ['variable' => $variable, 'type' => $type, 'defaultValue' => $defaultValue]);
 }
コード例 #6
0
ファイル: ListType.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\TypeInterface $type
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(TypeInterface $type, Location $location = NULL)
 {
     parent::__construct($location, ['type' => $type]);
 }
コード例 #7
0
ファイル: SelectionSet.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\SelectionInterface[] $selections
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(array $selections, Location $location = NULL)
 {
     parent::__construct($location, ['selections' => $selections]);
 }
コード例 #8
0
ファイル: Directive.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\Name $name
  * @param \Fubhy\GraphQL\Language\Node\Argument[] $arguments
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(Name $name, array $arguments = NULL, Location $location = NULL)
 {
     parent::__construct($location, ['name' => $name, 'arguments' => $arguments]);
 }
コード例 #9
0
ファイル: ObjectValue.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\ObjectField[] $fields
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(array $fields, Location $location = NULL)
 {
     parent::__construct($location, ['fields' => $fields]);
 }
コード例 #10
0
ファイル: Variable.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\Name $name
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(Name $name = NULL, Location $location = NULL)
 {
     parent::__construct($location, ['name' => $name]);
 }
コード例 #11
0
ファイル: ArrayValue.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\ValueInterface[] $values
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(array $values, Location $location = NULL)
 {
     parent::__construct($location, ['values' => $values]);
 }
コード例 #12
0
ファイル: Argument.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\Name $name
  * @param \Fubhy\GraphQL\Language\Node\ValueInterface $value
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(Name $name, ValueInterface $value, Location $location = NULL)
 {
     parent::__construct($location, ['name' => $name, 'value' => $value]);
 }
コード例 #13
0
ファイル: FragmentSpread.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\Name $name
  * @param \Fubhy\GraphQL\Language\Node\Directive[] $directives
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(Name $name, array $directives = [], Location $location = NULL)
 {
     parent::__construct($location, ['name' => $name, 'directives' => $directives]);
 }
コード例 #14
0
ファイル: Document.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Location $location
  * @param \Fubhy\GraphQL\Language\Node\DefinitionInterface[] $definitions
  */
 public function __construct(array $definitions, Location $location = NULL)
 {
     parent::__construct($location, ['definitions' => $definitions]);
 }
コード例 #15
0
ファイル: Field.php プロジェクト: fubhy/graphql-php
 /**
  * Constructor.
  *
  * @param \Fubhy\GraphQL\Language\Node\Name $name
  * @param \Fubhy\GraphQL\Language\Node\Name $alias
  * @param \Fubhy\GraphQL\Language\Node\Argument[] $arguments
  * @param \Fubhy\GraphQL\Language\Node\Directive[] $directives
  * @param \Fubhy\GraphQL\Language\Node\SelectionSet $selectionSet
  * @param \Fubhy\GraphQL\Language\Location $location
  */
 public function __construct(Name $name, Name $alias = NULL, array $arguments = [], array $directives = [], SelectionSet $selectionSet = NULL, Location $location = NULL)
 {
     parent::__construct($location, ['name' => $name, 'alias' => $alias, 'arguments' => $arguments, 'directives' => $directives, 'selectionSet' => $selectionSet]);
 }