Operations & Documents
What a client sends: operations, selection sets, variables, fragments and the validation a document must survive — the fastest way to tell who has written GraphQL from who has only read about it.
part ofGraphQLoverview, primer and where to startread it →on this pageshowhide
explore
- Operation Types & Names4 questions
- Selection Sets & Aliases3 questions
- Variables & Coercion3 questions
- Named Fragments3 questions
- Inline Fragments4 questions
- Executable Directives4 questions
- Document Validation3 questions
- Document Syntax & Parsing4 questions
- Argument Values & Literals3 questions
- Fragment Colocation3 questions
questions
page 2 of 2Why is a custom executable directive in a GraphQL document not portable?
basics
~20 sOnly @skip and @include are executable directives every GraphQL server must support. Anything else is defined by one server, with behaviour the specification never describes, so a document using it fails validation elsewhere as an unknown directive.
What does a GraphQL inline fragment with no type condition mean?
basics
~20 sThe type condition is optional. Written as ... { ... }, the fragment takes the enclosing selection set's type as its condition, so it always applies. Its practical use is grouping several fields under one directive.
In a GraphQL response, how does a fragment spread's position affect key order?
basics
~20 sResponse keys follow the order the document requests them, with each fragment expanded in place at its spread. A response key that appears twice keeps its first position, so a later duplicate never moves it to the end.
Why can't one GraphQL subscription operation watch two event streams at once?
basics
~20 sBecause a subscription operation's root selection set must collapse to exactly one field, and that field is what creates the event source. Two streams means two subscription operations, or one root field emitting a union of event shapes.
showing 31–34 of 34