Exemplo n.º 1
0
 /**
  * @return array
  */
 public static function getInternalDirectives()
 {
     if (!self::$internalDirectives) {
         self::$internalDirectives = ['include' => new self(['name' => 'include', 'description' => 'Directs the executor to include this field or fragment only when the `if` argument is true.', 'locations' => [self::LOCATION_FIELD, self::LOCATION_FRAGMENT_SPREAD, self::LOCATION_INLINE_FRAGMENT], 'args' => [new FieldArgument(['name' => 'if', 'type' => Type::nonNull(Type::boolean()), 'description' => 'Included when true.'])]]), 'skip' => new self(['name' => 'skip', 'description' => 'Directs the executor to skip this field or fragment when the `if` argument is true.', 'locations' => [self::LOCATION_FIELD, self::LOCATION_FRAGMENT_SPREAD, self::LOCATION_INLINE_FRAGMENT], 'args' => [new FieldArgument(['name' => 'if', 'type' => Type::nonNull(Type::boolean()), 'description' => 'Skipped when true'])]]), 'deprecated' => new self(['name' => 'deprecated', 'description' => 'Marks an element of a GraphQL schema as no longer supported.', 'locations' => [self::LOCATION_FIELD_DEFINITION, self::LOCATION_ENUM_VALUE], 'args' => [new FieldArgument(['name' => 'reason', 'type' => Type::string(), 'description' => 'Explains why this element was deprecated, usually also including a ' . 'suggestion for how to access supported similar data. Formatted ' . 'in [Markdown](https://daringfireball.net/projects/markdown/).', 'defaultValue' => self::DEFAULT_DEPRECATION_REASON])]])];
     }
     return self::$internalDirectives;
 }
Exemplo n.º 2
0
 public static function getInternalDirectives()
 {
     if (!self::$internalDirectives) {
         self::$internalDirectives = ['include' => new self(['name' => 'include', 'description' => 'Directs the executor to include this field or fragment only when the `if` argument is true.', 'args' => [new FieldArgument(['name' => 'if', 'type' => Type::nonNull(Type::boolean()), 'description' => 'Included when true.'])], 'onOperation' => false, 'onFragment' => true, 'onField' => true]), 'skip' => new self(['name' => 'skip', 'description' => 'Directs the executor to skip this field or fragment when the `if` argument is true.', 'args' => [new FieldArgument(['name' => 'if', 'type' => Type::nonNull(Type::boolean()), 'description' => 'Skipped when true'])], 'onOperation' => false, 'onFragment' => true, 'onField' => true])];
     }
     return self::$internalDirectives;
 }
Exemplo n.º 3
0
 public static function getInternalDirectives()
 {
     if (!self::$internalDirectives) {
         self::$internalDirectives = ['if' => new self(['name' => 'if', 'description' => 'Directs the executor to omit this field if the argument provided is false.', 'type' => Type::nonNull(Type::boolean()), 'onOperation' => false, 'onFragment' => false, 'onField' => true]), 'unless' => new self(['name' => 'unless', 'description' => 'Directs the executor to omit this field if the argument provided is true.', 'type' => Type::nonNull(Type::boolean()), 'onOperation' => false, 'onFragment' => false, 'onField' => true])];
     }
     return self::$internalDirectives;
 }
 /**
  * Scalar Cassandra types to be used by data providers
  */
 public function scalarCassandraTypes()
 {
     return array(array(Type::ascii(), array("a", "b", "c")), array(Type::bigint(), array(new Bigint("1"), new Bigint("2"), new Bigint("3"))), array(Type::blob(), array(new Blob("x"), new Blob("y"), new Blob("z"))), array(Type::boolean(), array(true, false, true, false)), array(Type::double(), array(1.1, 2.2, 3.3, 4.4)), array(Type::float(), array(new Float(1.0), new Float(2.2), new Float(2.2))), array(Type::inet(), array(new Inet("127.0.0.1"), new Inet("127.0.0.2"), new Inet("127.0.0.3"))), array(Type::text(), array("a", "b", "c", "x", "y", "z")), array(Type::timestamp(), array(new Timestamp(123), new Timestamp(456), new Timestamp(789))), array(Type::timeuuid(), array(new Timeuuid(0), new Timeuuid(1), new Timeuuid(2))), array(Type::uuid(), array(new Uuid("03398c99-c635-4fad-b30a-3b2c49f785c2"), new Uuid("03398c99-c635-4fad-b30a-3b2c49f785c3"), new Uuid("03398c99-c635-4fad-b30a-3b2c49f785c4"))), array(Type::varchar(), array("a", "b", "c", "x", "y", "z")), array(Type::varint(), array(new Varint(1), new Varint(2), new Varint(3))));
 }
Exemplo n.º 5
0
 public function scalarTypes()
 {
     return array(array(Type::ascii(), "ascii"), array(Type::bigint(), new Bigint("9223372036854775807")), array(Type::blob(), new Blob("blob")), array(Type::boolean(), true), array(Type::counter(), new Bigint(123)), array(Type::decimal(), new Decimal("3.14159265359")), array(Type::double(), 3.14159), array(Type::float(), new Float(3.14159)), array(Type::inet(), new Inet("127.0.0.1")), array(Type::int(), 123), array(Type::text(), "text"), array(Type::timestamp(), new Timestamp(123)), array(Type::timeuuid(), new Timeuuid(0)), array(Type::uuid(), new Uuid("03398c99-c635-4fad-b30a-3b2c49f785c2")), array(Type::varchar(), "varchar"), array(Type::varint(), new Varint("9223372036854775808")));
 }