#Lesson 7 - Queries and mutations
This section covers querying and mutating content in the Hygraph API Playground.
The API Playground is not a demo environment. It queries the same Content API your frontend will use in lesson 8. Every query you run here returns real data from your project, and every mutation makes a real change. The patterns practiced in these two lessons are the same ones your frontend code will use.
The exercises are structured in the same order the schema was built: basic model queries first, then references, then components, then remote data. If a query returns unexpected results, it is a signal about the schema or content, not a problem with the query itself.
By the end of lesson 7.2, you will have:
- Queried all major schema features: models, references, components, remote fields, and top-level remote fields
- Created, updated, published, unpublished, and deleted a product entry programmatically
- Confirmed that every schema decision made in lessons 1 through 5 is reflected in the API
#Lessons in this section
| Lesson | What you will do |
|---|---|
| 7.1 Write queries | Run queries for models, references, components, remote fields, and top-level remote fields in the API Playground |
| 7.2 Write mutations | Create, update, publish, unpublish, and delete a product entry programmatically using the Product model mutations |
For the complete Content API reference, see Queries and Mutations.
#What's next
Lesson 7.1 - Write queriesOr, go to the Tutorial overview for the full lesson list.