rsnext/examples/with-apollo
Kristoffer K 2acb53bd30
chore: update example names to match their folders (#16268)
**What's the problem this PR addresses?**

A decent amount of the examples don't have a `name` field in `package.json` that matches their folder name, meaning they either lack a name or the names are duplicated.

I was testing Yarn 2 workspaces using the entire examples directory and needed to get rid of the duplicates.

**How did you fix it?**

Updated the names to match the names of their folders
2020-09-05 21:23:51 +00:00
..
components Replace Graphcool with dedicated example GraphQL server using Prisma (#15752) 2020-08-05 06:26:54 +00:00
lib Update with-apollo examples to merge existing cache (#15804) 2020-08-05 11:30:29 -04:00
pages Update Apollo example for 9.5 (#15546) 2020-07-28 01:16:08 -04:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json chore: update example names to match their folders (#16268) 2020-09-05 21:23:51 +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).