Learn how to write a mutation to record games.
- In the last video, we set up our Tic Tac Toe container…to show the Turing Test once the game was over.…Now we need to make sure that the Turing Test disappears…after the user makes the choice and we need to make sure…that their choice and the game information is recorded…in our graph.cool database.…To do that, we're going to make a new Mutation.…I think we want to use a CreateGame Mutation.…I'm going to close this Turing Test file here,…in the upper left, and then I'm going to go to my file tree…and I'm going to say New File and I'm going to name it…CreateGame.js because that's the name of the Mutation…that we're going to make.…
I also said that a lot of times…these Mutations tend to be similar.…So we're going to go to our CreateUser Mutation…and copy and paste most of this to help us.…I'll select all of it and I'll copy it and then I'll close…this file and I'll paste it into CreateGame.…I'll scroll up to the top and I'll start to change…the information that I don't need.…For one, I know this shouldn't be CreateUser,…
- Installing local dependencies
- Generating a starter project
- Deploying to Heroku
- Planning your development process
- Using styled-components
- Styling for mobile
- Setting up models on Graphcool
- Creating Relay mutations
- Adding Relay to your authentication flow
- Protecting routes with authentication
Skill Level Intermediate
2. Deployment Environments
3. App Functionality
4. Implementing Libraries
5. Creating Components
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.