Skip to content

Commit cb7ddd7

Browse files
committed
Add explainations of __Field and __InputValue
1 parent e83b97b commit cb7ddd7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

spec/Section 4 -- Introspection.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,36 @@ If the modified type of a List is a List, then each item in the first List is
342342
another List of the second List's type.
343343

344344
A Non-Null type cannot modify another Non-Null type.
345+
346+
347+
### The __Field Type
348+
349+
The `__Field` type represents each field in an Object or Interface type.
350+
351+
Fields
352+
353+
* `name` must return a String
354+
* `description` may return a String or {null}
355+
* `args` returns a List of `__InputValue` representing the arguments this
356+
field accepts.
357+
* `type` must return a `__Type` that represents the type of value returned by
358+
this field.
359+
* `isDeprecated` returns {true} if this field should no longer be used,
360+
otherwise {false}.
361+
* `deprecationReason` optionally provides a reason why this field is deprecated.
362+
363+
364+
### The __InputValue Type
365+
366+
The `__InputValue` type represents field and directive arguments as well as the
367+
`inputFields` of an input object.
368+
369+
Fields
370+
371+
* `name` must return a String
372+
* `description` may return a String or {null}
373+
* `type` must return a `__Type` that represents the type this input
374+
value expects.
375+
* `defaultValue` may return a String encoding (using the GraphQL language) the
376+
default value used by this input value in the condition a value is not
377+
provided at runtime. If this input value has no default value, returns {null}.

0 commit comments

Comments
 (0)