The document discusses organizing code into folders based on functionality, using URL parameters to retrieve specific information, running queries on page load and mutations on user actions, calling queries in parent React components and mutations in child components as a general pattern, and a process for building new features that involves understanding scope, establishing GraphQL fields, implementing types and resolvers, and building the UI.
The document discusses organizing code into folders based on functionality, using URL parameters to retrieve specific information, running queries on page load and mutations on user actions, calling queries in parent React components and mutations in child components as a general pattern, and a process for building new features that involves understanding scope, establishing GraphQL fields, implementing types and resolvers, and building the UI.
Create explicit index files to "barrel" export functionality Create explicit index files to "barrel" export functionality Routing & URL Parameters Use URL parameters to get specific information Queries & Mutations Queries are often run on page-level
Mutations are often run on user action
Query errors are often page-level
Mutation errors are often a notification
Call Queries on Parent React components
Execute Mutations on specific React child components
This is a general pattern, not a must!
E.g. we'll do things differently when we handle OAuth
Building New Features 1. Understand the scope and what we intend to accomplish. 2. Establish the GraphQL fields we'll need. 3. Implement type definitions & resolver functions for the new fields. 4. Build the client-side UI to consume the new GraphQL fields.