Created by Facebook, a GraphQL server has four MAIN responsibilities:
- Receive requests in GraphQL format (query and mutation)
- Connect to DB and services
- Validate requests
- Return GraphQL responses (requested data and error messages)
Schema-Driven Development
The steps we’ll follow to build a GraphQL server, which revolves around schema definition will be:
- Define your types and the queries and mutations for them
- Implement functions called resolvers to handle these types and their fields
- As new requirements arrive, go back to step 1 to update the schema and continue through the other steps
Try making a project in Django to understand GraphQL better.