You probably wouldn’t :) This turned out to be more of a proof-of-concept than something that we actually pushed to production. A good learning experience nonetheless.
Yeah, it seems that no matter which state management solution you choose there will be at least some boilerplate. I can report back in the future, but for now, I only have this in the “proof-of-concept” stage within a real project.
Thanks for sharing your CodeSandbox. I like the changes you made. The reason I set my example up the way I did was for teaching purposes. I wanted `index.js` to be as simple as possible so I could focus on setting up a `client` there and then touch on cache updates separately later on.
Updated the post. Turns out you don’t need to have a server-side schema. I was able to update this example by defining
resolvers on the client and omitting the
link property from
Could you give an example or two of the “non-GraphQL related data” you are thinking about? You could, most likely, add fields representing this data to your GraphQL schema and fetch/mutate them through resolvers.
Thank you! You make a great point. As far as I can tell there is currently no way to run apollo-client without a server-side schema. You need a schema on the server which you extend on the client. I am going to clean this post up though by moving the
name fields to the client-side schema, that way everything I query is fetched through