⬡ GraphQL
Beginner
What are the three root types in GraphQL?
Answer
GraphQL has three root operation types that serve as entry points into the API. Query is the root type for read operations — every field on type Query is a top-level data fetcher. Mutation is the root type for write operations (create, update, delete). Subscription is the root type for real-time event streams. Every GraphQL schema must have at least a Query type. Mutation and Subscription are optional. The schema declaration ties them together: schema { query: Query mutation: Mutation subscription: Subscription }.
Previous
What are aliases in GraphQL?
Next
What is the difference between nullable and non-null types in GraphQL?