In this video, Emmanuel Henri creates the initial database file which will feed your server with mock data. He first creates the database file, and then adds a script to update the schema file for Relay.
- [Instructor] In order to use Relay properly,…we need to update a few files related…to our data and schema.…First we'll add a JSON file to be our central data source…and code our Relay database file.…Let's get to it.…Okay, so first let's go into our Exercise files,…go into the Resources, and find the data.json file,…and open Friends, and drag it inside…of that folder, like so.…So what we want to do is create a data folder…inside of our Friends application, like that,…and put the data.json file inside of our data folder,…like so, perfect.…
Close that, go back into Visual Code, and the first thing…I want to do is, because we're going to pull our schema…directly from our data folder,…we don't need this one anymore, so we'll remove it.…Save it, and inside of our main folder,…create a new folder called Scripts.…And inside of that folder,…create a file called Update Schema.…So, if you remember when we created our Relay script…in our package.json file, we'll update as schema.graphql,…and this file is not existing yet, but the Update Schema…
- Setting up GraphQL
- Running queries
- Updating schema and solvers
- Adding data
- Adding Relay entry components
- Coding GraphQL fragments
Skill Level Advanced
Node.js: Build Your First Microservice (2016)with Daniel Khan2h 9m Intermediate
1. Introduction and Setup
2. GraphQL Development
3. Relay Setup
4. React Integration
Next steps1m 12s
- 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.