In this video, Emmanuel Henri finalizes the schema file. He adds the proper schema type, and then adds all the proper Relay code to handle each query from GraphQL.
- [Instructor] Okay, so let's continue coding…our relay and GraphQL schema file.…First thing I want you to do…is creating a constant with connectionType…and we'll establish our friends connection there…and let me just make sure that…I have that plural at the top as well…and I don't, I knew there was a little typo there,…so friendsConnection, let's go back, like so,…and then do connectionDefinitions…and the connection definition is called friends…and the nodeType GraphQLFriend.…
So what we're doing here is basically establishing…the connection in between the friend…and the GraphQL friend from here and here…and we're establishing and declaring that…in this slide, alright?…The next one will be the query…and we'll create a new GraphQL object type,…like so, and this will be named, guess what?…Query, like so,…and then we need to define the fields…like we've done previously which is a function, like so,…and then we'll have node which is a nodeField…and then inside of the query we'll have the viewer…and, again, I will explain this shortly, I promise.…
- 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.