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.
- [Voiceover] Alright, so let's continue…building our data files.…So the first thing I want you to do…is create a new file in our data folder.…You can either right click or click at the top here…and call this file database.js like so.…And in this file I want you to import…the data from the data.json file…that we just inserted inside of our folder.…So let me go ahead and show what's included in that folder.…So what I did just before we created this course,…when I created this file, I used some fake names…and fake images and so on so forth,…so this is an array of objects with properties,…first name, last name, gender, language,…email and image, which looks very familiar,…and we'll use that to create our database file.…
So inside of our database file,…you want to create a class called 'user',…then create a class called 'friend' like so,…so what we'll do next is create some mock data…and create a user and create some friends for our user.…So let's go ahead and do that,…so we create a constant called 'viewer',…and by the way, this is a term that we're going to use…
- Setting up GraphQL
- Running queries
- Updating schema and solvers
- Adding data
- Adding Relay entry components
- Coding GraphQL fragments
Skill Level Advanced
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.