You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Install UrQL dependencies
- Created the examples folder `with-urql`
- Installed the dependencies
- Got a simple index.js page setup
* Basic UrQL example
- Connects to Pokemon GraphQL API
* Loading Pokemon list + Pokemon page
- Using `isomorphic-unfetch` because `urql` uses `window.fetch` to get data because we need to query the GraphQL API using Node (in `getStaticProps`)
- Deleted `_app.js` since we're not using UrQL to query data on the clientside
- Put all GraphQL related code in `/graphql`
* Update README for UrQL example
* Update urql casing
* Update examples/with-urql/graphql/client.js
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Update examples/with-urql/pages/index.js
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Update examples/with-urql/pages/pokemon/[name].js
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Fix linting
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
Use [urql](https://github.com/FormidableLabs/urql) with Next.js using SSG.
4
+
5
+
## Deploy your own
6
+
7
+
Deploy the example using [Vercel](https://vercel.com/now):
8
+
9
+
[](https://vercel.com/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-urql)
10
+
11
+
## How to use
12
+
13
+
### Using `create-next-app`
14
+
15
+
Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-urql
29
+
cd with-urql
30
+
```
31
+
32
+
Install it and run:
33
+
34
+
```bash
35
+
npm install
36
+
npm run dev
37
+
# or
38
+
yarn
39
+
yarn dev
40
+
```
41
+
42
+
Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
0 commit comments