/** * @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; }
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; }
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; }
/** * Input fields for mutation. * * @return array */ protected function inputFields() { return ['id' => ['name' => 'id', 'type' => Type::nonNull(Type::string())], 'name' => ['name' => 'name', 'type' => Type::nonNull(Type::string())]]; }
/** * Available query arguments. * * @return array */ public function args() { return ['id' => ['type' => Type::nonNull(Type::string())]]; }