- [Instructor] And here what we're going to do…is we're going to add one more query to actually pull…in some actual local client information.…So, we'll say New File,…and we're going to call this our LocalQuery.js.…This keeps it separate from the combined,…so that when we do our re-fetch queries…we don't reset all of our application state.…So now with our LocalQuery we'll simply import React…from react import Query…from react apollo,…import our tag template literal gql from graphgql tag.…
So here we're going to say export const…local query gql,…then here we're going to say query LocalQuery.…Come into here and we're going to do our selectedWidgetIds.…This needs to correspond to the structure…that we have over here in index.…
So, in our index JS file we have selectedWidgetIds.…That same name has to be what we're referencing here.…And then of course we'll just come into here…and actually do our export LocalQuery…props, and then we'll come down to here…and we'll do our query…and specify our query here local query.…Boom.…
Skill Level Advanced
GraphQL Essential Training (2018)with Emmanuel Henri1h 54m Intermediate
React.js Essential Training (2018)with Eve Porcello1h 25m Intermediate
1. Apollo Client State with React
- 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.