Define GraphQL.
A query language for APIs that allows clients to request specific data.
True or false: GraphQL uses a fixed structure for responses.
FALSE
The structure of responses in GraphQL is flexible and depends on the query.
What does schema define in GraphQL?
It defines the types, queries, and mutations available in the API.
Fill in the blank: Resolvers are functions that resolve _______ in GraphQL.
data
What is a mutation in GraphQL?
A type of operation that modifies server-side data.
Define query in the context of GraphQL.
A request for data from the server.
True or false: GraphQL can only fetch data, not modify it.
FALSE
GraphQL supports both fetching and modifying data through queries and mutations.
What is introspection in GraphQL?
A feature that allows clients to query the schema for its types and fields.
Fill in the blank: Fragments in GraphQL are used to share _______ across queries.
fields
What is the purpose of variables in GraphQL queries?
To allow dynamic input values in queries.
Define subscription in GraphQL.
A way to receive real-time updates from the server.
True or false: GraphQL supports versioning of APIs.
FALSE
GraphQL encourages a single evolving version rather than multiple versions.
What is a type in GraphQL?
A definition of a data structure in the schema.
Fill in the blank: Enums in GraphQL are used to define a set of _______.
allowed values
What is the role of directives in GraphQL?
To modify the behavior of queries and fields.
Define Apollo Client.
A popular library for managing GraphQL data in client applications.
True or false: GraphQL is primarily used with REST APIs.
FALSE
GraphQL is an alternative to REST APIs, not primarily used with them.
What does N+1 problem refer to in GraphQL?
A performance issue where multiple database queries are made unnecessarily.
Fill in the blank: Batching in GraphQL helps to reduce _______ calls.
network
What is schema stitching in GraphQL?
A technique to combine multiple GraphQL schemas into one.