In a GraphQL query, how do you request data from nested objects?

In a GraphQL query, how do you request data from nested objects?

a) By creating a separate query for each object
b) By sending a POST request
c) By specifying fields inside the nested objects in the query
d) By using multiple endpoints

Answer:

c) By specifying fields inside the nested objects in the query

Explanation:

In GraphQL, you can request data from nested objects by specifying the fields inside those objects directly in the query, retrieving hierarchical data in a single request.

Reference:

GraphQL Quiz – MCQ – Multiple Choice Questions

Scroll to Top