GraphQL クエリ Language リファレンス
リファレンス 用 GraphQL queries, mutations, fragments, variables, および 実行 semantics.
Query Syntax
GraphQL queries select fields from the root Query type, nesting to fetch related data. Fields can have arguments in parentheses. Aliases rename result fields using the colon syntax. Fragments reuse field selections across queries. Variables parameterize queries, declared at the top and passed separately. Only the fields requested are returned, no over- or under-fetching.
- nesting
- Select related fields
- aliases
- Rename result keys
- variables
- Parameterize queries
user { posts { title } } myUser: user { id } $id: ID! Mutations and Subscriptions
Mutations modify data and return results; they are executed serially, not in parallel. The input type pattern structures mutation arguments. Subscriptions establish real-time connections for event streams. Operation names aid debugging and caching. Directives like @skip and @include conditionally include fields. The query complexity can be limited to prevent abuse.
- mutations
- Serial execution
- subscriptions
- Real-time events
- @skip/@include
- Conditional fields
modify then return WebSocket transport if: $condition