Commit graph

10 commits

Author SHA1 Message Date
Horacio Valencia
081b8fba67
Updates Apollo Server Examples to use Apollo Server 4 & @as-integrations/next (#42771)
Closes https://github.com/vercel/next.js/issues/42769

## Description 

This PR address https://github.com/vercel/next.js/issues/42769 by updating the `api-routes-apollo-server`, `api-routes-apollo-server-and-client` and `api-routes-apollo-server-and-client-auth` examples to use Apollo Server 4 and [@as-integrations/next](https://github.com/apollo-server-integrations/apollo-server-integration-next), which is the Apollo Server Next integration package. The PR also updates the three examples to use Typescript. The functionality of the examples is the same.


## Documentation / Examples
- [X] Make sure the linting passes by running `pnpm build && pnpm lint`
- [X] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)


closes https://github.com/vercel/next.js/pull/33545
closes https://github.com/vercel/next.js/pull/30082
closes https://github.com/vercel/next.js/issues/21984
closes #10413
2022-11-14 12:13:31 +00:00
Craig Wheeler
57426a2849
Update Examples to use React 18 (#42027)
This PR updates the minimum version of React used by examples from 17.0.2 to 18.2.0.

Fixes #41975

## Bug

- [x] Related issues linked using `fixes #41975`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-28 17:43:20 +00:00
Herman
25a4c00559
[EXAMPLES] fix apollo client cache hydration (#27799)
Current implementation causes bugs when navigating between SSG,SSR and 
Client Side pages as cache gets overwritten.

Reusing more appropriate implementation used in example 
api-routes-apollo-server-and-client-auth introduced with commit 
4bbdd09097
2022-05-22 21:47:25 -05:00
Oscar Busk
077097b7f8
Remove licence from all example/package.json that has them (#28007)
* Add licences to all example/package.json that lack them

* Revert "Add licences to all example/package.json that lack them"

This reverts commit 5d4e25012f7334772b8ef5924bc355277e827cba.

* Update check-examples to remove `license` field from examples

* Remove `license` from all examples.

This was mentioned in vercel/next.js#27121 but it looks like it didn't end up being in the merge?

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-14 10:48:39 -05:00
Luc Leray
f52955ec94
Clean up examples package.json (#27121)
Clean up package.json files in the `examples` directory:
- Add `private: true`
- Remove `version` (because they are irrelevant for packages that are not meant to be published)
- Remove `name` (because they are optional for packages that are not meant to be published, and when someone clones an example, they often rename it and the property becomes stale)
- Remove `author`
- Remove `description`
- Remove `license`

Also remove `with-dynamic-app-layout` example completely, since it does the same as `layout-component` (https://github.com/vercel/next.js/pull/27121#discussion_r668178408).

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-12 19:58:03 +00:00
Nick Babcock
5629223407
Update examples to use React 17 (#26133)
[With next 11 requiring react 17](https://nextjs.org/blog/next-11#upgrade-guide), most of the examples
need to be updated, so the following snippet updated all the examples to
a compatible react version.

```bash
cd examples/
fd -g 'package.json' | xargs sed -r -i 's/"react": ".*"/"react": "^17.0.2"/
fd -g 'package.json' | xargs sed -r -i 's/"react-dom": ".*"/"react-dom": "^17.0.2"/'

# exclude experimental react version
git checkout with-reason-relay/package.json
```
2021-06-16 16:43:26 +00:00
Joe Haddad
f17d435166
Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
David Stotijn
48621b3c7e
Update to 3.0 in api-routes-apollo-server-and-client example (#15270) 2020-07-17 16:25:41 -04:00
Luis Alvarez D
792a113d48
[Examples] Move api-routes-apollo-server-and-client to SSG (#13782)
Ref: https://github.com/vercel/next.js/pull/13742
2020-06-06 13:04:52 +00:00
Aaron Reisman
6c01bbd6df Add Apollo Server and Client Example App (#8195)
* Add Apollo Server and Client Example

* Update Apollo Client to use previous example setup
2019-09-05 18:42:32 -05:00