In this video, Emmanuel Henri codes the schema file. He adds the proper schema type, and then adds all the proper Relay code to handle each query from GraphQL.
- [Lecturer] Let's continue setting up our database…with our schema file.…The way I'm going to do this is to do the imports first…and then create the types…and then in following videos we'll create the rest…because this is the major file…of the Relay/GraphQL connections.…This is where the magic is going to happen…in between Relay and GraphQL,…so it's quite the big file.…What I want you to do is go into data…and create a new file…and we'll call this one schema.js.…
And then, in this file, we'll import a few things.…Import.…And then, instead of importing them on the same line,…we'll do multiple lines because there's quite a bit there.…GraphQLObjectType,…like so,…and then copy and paste this one.…Let's make sure there is no typo before we copy that.…Okay, copy.…And then we'll paste it.…And then, instead of doing ObjectType,…we'll do Schema.…
And then, we'll do that one more time.…And do String,…like so.…And then from…graphql.…Then we'll do an import again…and then do also,…multiple lines.…And this one will import connectionArgs…
- Setting up GraphQL
- Running queries
- Updating schema and solvers
- Adding data
- Adding Relay entry components
- Coding GraphQL fragments
Skill Level Intermediate
Node.js: Build Your First Microservicewith 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.