Bird
0
0

Why is the info argument included in a GraphQL resolver function signature even if often unused?

hard📝 Conceptual Q10 of 15
GraphQL - Resolvers
Why is the info argument included in a GraphQL resolver function signature even if often unused?
AIt contains the authentication token for the request
BIt is required to access the arguments passed to the query
CIt holds the parent resolver's return value
DIt provides details about the execution state and query AST for advanced use cases
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of info

    Info contains the abstract syntax tree (AST) of the query and execution state, useful for advanced features like query analysis or optimization.
  2. Step 2: Differentiate info from other arguments

    Authentication is in context, parent holds previous resolver result, and args hold query arguments.
  3. Final Answer:

    It provides details about the execution state and query AST for advanced use cases -> Option D
  4. Quick Check:

    info = query AST and execution details [OK]
Quick Trick: Info holds query details, not auth or args [OK]
Common Mistakes:
  • Confusing info with context
  • Thinking info holds args or auth
  • Ignoring info argument completely

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes