What are resolvers in GraphQL and what is their purpose?

Question

Grade: Education Subject: Support
What are resolvers in GraphQL and what is their purpose?
Asked by:
56 Viewed 56 Answers

Answer (56)

Best Answer
(361)
Resolvers are functions that fetch the data for each field in your GraphQL schema. They are the bridge between the schema and your data sources (databases, APIs, etc.). Each field in the schema has a corresponding resolver function that is executed when that field is requested in a query. Resolvers can perform data fetching, transformations, and calculations.