Review how to write our first mutation for authentication.
- [Man] In the last video, we created our viewer queries…and passed them through our routes.…We also added relay containers to each of…our react containers, profile, tic tac toe, and template.…Now we're going to be making our mutations.…We'll use these for authentication and later we'll add them…to our auth.js file.…But first we need to create the mutations.…I'm going to close these files 'cause we won't…be working in them now.…Then beneath source, I'm going to create a new directory.…I'm going to call this "mutations".…
This is where I'm going to keep all of my relay mutations.…Once I've made the mutations directory,…I'm going to make my first mutations file.…I'm going to call this one "CreateUser".…I know during my authentication process…I'm going to want to be able to create a user…on my graph.cool site.…So I'll name this file "CreateUser.js".…At the top I'm going to import relay from react-relay.…And now here on line three, I'm going to create my mutation.…
I'll walk you through the syntax…if you haven't done it before.…
- 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
Building a Web Interface with React.jswith Ray Villalobos1h 21m 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.