Bird
0
0

Which of the following is TRUE about the info argument in a GraphQL resolver?

easy📝 Conceptual Q2 of 15
GraphQL - Resolvers
Which of the following is TRUE about the info argument in a GraphQL resolver?
AIt is used to send HTTP status codes
BIt holds the raw JSON response from the server
CIt stores the user's session data
DIt contains the parsed abstract syntax tree (AST) of the query
Step-by-Step Solution
Solution:
  1. Step 1: Identify what info contains

    The info argument includes the parsed AST of the GraphQL query, which describes the query's structure.
  2. Step 2: Exclude incorrect options

    Raw JSON response, session data, and HTTP status codes are handled elsewhere, not in info.
  3. Final Answer:

    It contains the parsed abstract syntax tree (AST) of the query -> Option D
  4. Quick Check:

    Info = Parsed query AST [OK]
Quick Trick: Info holds query AST, not response or session [OK]
Common Mistakes:
  • Mixing info with response data
  • Assuming info manages HTTP details
  • Confusing info with context/session

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes