GraphQL Fundamentals: Queries, Mutations & Schema Design
GraphQL Fundamentals: Queries, Mutations & Schema Design
Up to 20 questions, shuffled on every run
Welcome to the GraphQL Basics Quiz! Mastering GraphQL is essential for building efficient, flexible APIs that empower clients to request exactly what they need. This quiz will test your understanding of core GraphQL concepts like queries, mutations, schema design, and more. Each question is designed to challenge your knowledge and help you solidify your grasp of GraphQL fundamentals. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 28, so a second attempt will not be the same run. Everything in the pool is listed here.
What is the primary difference between GraphQL and REST?
AnswerGraphQL lets clients request specific fields; REST returns fixed data shapes
In GraphQL, what is a query?
AnswerA read-only fetch operation used to request specific data from the server
What is the purpose of a GraphQL schema?
AnswerTo define the types, fields, and operations available in the API
What is a mutation in GraphQL?
AnswerAn operation used to create, update, or delete data on the server
What is a resolver in GraphQL?
AnswerA function that populates the data for a specific field in the schema
In GraphQL, what is a scalar type?
AnswerA primitive leaf type representing values like String, Int, or Boolean
What does "strongly typed" mean in the context of GraphQL?
AnswerThe server validates the query structure against the schema before execution
What is a GraphQL fragment used for?
AnswerTo define a reusable set of fields that can be shared across queries
What is a subscription in GraphQL?
AnswerAn operation that maintains a connection to push real-time data updates
What does the term "N+1 query problem" mean in GraphQL?
AnswerFetching a list of items results in one database call for every item
In GraphQL, what is an "object type"?
AnswerA schema type that contains a collection of named fields and their types
What is a GraphQL argument?
AnswerA value passed to a field to customize or filter the data it returns
What does "introspection" mean in GraphQL?
AnswerThe ability to query the schema itself to learn about its structure
In GraphQL, what is a "non-null" type?
AnswerA field that is guaranteed to return a value instead of a null result
What is a GraphQL union type?
AnswerA type that allows a field to return one of several different object types
What syntax represents a list of items in a GraphQL schema?
AnswerWrapping the type name in square brackets, such as [User]
What is an "input type" in GraphQL?
AnswerA special type used to pass complex objects as arguments to fields
What is the difference between a root query and a root mutation?
AnswerQueries are for fetching data; mutations are for changing data
What is a "directive" in GraphQL?
AnswerA modifier starting with @ that changes how a query is executed
What does the @deprecated directive do?
AnswerMarks a field as no longer supported to discourage its future use
What is the primary purpose of a "DataLoader"?
AnswerTo batch and memoize data requests to reduce database overhead
What is a GraphQL "interface" type?
AnswerAn abstract type that defines a set of fields multiple types must implement
How are variables passed to a GraphQL query?
AnswerBy defining them with a $ prefix and passing values in a JSON object
What is "query complexity" in GraphQL?
AnswerA calculation of the resource cost of a query to prevent server abuse
What is "rate limiting" in GraphQL?
AnswerRestricting the number of requests a client can make in a timeframe
What is "schema stitching" in GraphQL?
AnswerThe process of merging multiple underlying APIs into one gateway
What is an "enum" type in GraphQL?
AnswerA special scalar that restricts a field to a fixed set of values
When would you use an "alias" in a GraphQL query?
AnswerTo rename the result key of a field to avoid name collisions









