Event Booking API + Frontend App
Reference: Build a Project with GraphQL, Node, MongoDB and React.js
Language:
- Javascript
Tech stack: - GraphQL
- Node
- MongoDB
- React
- Tailwindcss
What we'll build
What is GraphQL
- Is an alternative for a REST API
- GraphQL is more flexible
- REST API is limited on your endpoint (e.g. GET/post)
- GraphQL is flexible because it exposes a query language for the frontend
How does GraphQL work?
- You always send a POST request -> One single Endpoint
- POST Request contains Query Expression (to define the Data that should be returned)
A GraphQL Query
Operation Types
- query -> Retrieve Data ("GET")
- mutation -> Manipulate Data ("POST", "PUT", "PATCH", "DELETE")
- subscription -> Set up realtime connection via Websockets