rsnext/examples/with-apollo
Yordis Prieto 1e3534e169
Add apollo state func (#19137)
The intention is to show people the correlation between things, in this case, understand the usage of the same key from the props and the rehydration.

Hopefully, this change will bring value as it has done with some Juniors already.
2020-11-15 23:04:22 +00:00
..
components Fix with-apollo example (#17686) 2020-10-08 03:45:28 +00:00
lib Add apollo state func (#19137) 2020-11-15 23:04:22 +00:00
pages Add apollo state func (#19137) 2020-11-15 23:04:22 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Fix issues with apollo cache data merging and restoration (#17681) 2020-11-05 18:24:39 +00:00
README.md Simplify example usage instructions (#16678) 2020-08-29 22:22:02 -04:00

Apollo Example

Apollo is a GraphQL client that allows you to easily query the exact data you need from a GraphQL server. In addition to fetching and mutating data, Apollo analyzes your queries and their results to construct a client-side cache of your data, which is kept up to date as further queries and mutations are run.

In this simple example, we integrate Apollo seamlessly with Next.js data fetching methods to fetch queries in the server and hydrate them in the browser.

This example relies on Prisma + Nexus for its GraphQL backend.

Demo

https://next-with-apollo.now.sh

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-apollo with-apollo-app
# or
yarn create next-app --example with-apollo with-apollo-app

Deploy it to the cloud with Vercel (Documentation).