In this video, Emmanuel Henri concludes adding the network layer, base Relay environment which consists of the cache and network handling, and QueryRenderer code in order for Relay to connect to GraphQL.
- [Narrator] Okay so let's continue building…our relay entry point.…So the first thing I want you to do is import…a few more things.…So remember in a previous video we used a…QueryRenderer and graphqL so we'll load those up here…like so and we're getting them from react-relay.…Then we'll also import a few things that we need…for our relay environment,…so we need Environment, we need Network,…so we can create the network layer.…
RecordSource and we need the Store.…So this is very similar to Redux, and this is coming from…relay-runtime.…Okay, so now we need to create the network layer…so what the network layer does is access the graphqL…server with relay, so let's go ahead and do that,…just below the import of Friends,…this is where we will create it, so we'll create a function…called fetchQuery and inside of it we'll use…the operation and variables…and we need to return a fetch of graphqL…and we'll use the method POST…and this is all code that will help us connect…to graphqL so we're basically setting up right now…
- 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.