Skip to content

ServerlessReact.dev

Student Login
  • Welcome to the workshop
Introduction
Building your app
Before you head out

Part 3: Play around with GraphQL

We're going to use a lot of GraphQL in our app. This is your chance to play around with GraphQL using a schema just like we're going to build in our app.

If the iframe doesn't load, try disabling your browser's 3rd party cookie protection for this site, or visit the playground directly

The basics

GraphQL works by defining the shape of what you're looking for.

query {
what_you_want {
its_property
}
}

You use mutations to save data.

mutation {
yourMutation(prop1: "value", prop2: "value") {
return_value
}
}

Try using the autocomplete feature and the schema definition in the playground above to complete these 4 exercises.

Exercises

  • fetch a list of all landing pages
  • fetch a specific landing page
  • create a new page
  • update a page

Did you enjoy this chapter?

Previous:
Setting up the basics
Next:
configure authentication
Created bySwizecwith ❤️