## Motivation
As Graphcool is being shutdown, we replaced all the graphcool api endpoints with some handcrafted APIs using Prisma & Nexus, that can be found here https://github.com/prisma-labs/nextjs-graphql-api-examples. These GraphQL endpoints are now deployed to Vercel.
## Notes
- I couldn't get the reason-relay example to run. Given that the relay endpoint works on the other relay example, I don't see any reason why it wouldn't work on that one
- The `with-apollo` example is buggy when creating some posts, but nothing related to the switch of the api endpoint as it was already buggy before. I suspect the `concatPagination` strategy to be the cause of that bug, but I couldn't figure it out.
Fixes#14780
* Example with-react-relay-network-modern: update dependencies
* Example with-react-relay-network-modern: move relay __generated__ out of pages dir
* Example with-react-relay-network-modern: fix some errors
- Without checking if props.allBlogPosts exists it fails sometimes on
"TypeError: Cannot read property 'edges' of undefined"
- I have no idea how it could work before with Component.query().params.name,
but maybe some dependent library API has changed
* Example with-relay-modern-server-express: update dependencies
* Example with-relay-modern-server-express: move relay __generated__ out of pages dir
Fixes Error: Build optimization failed: found page without a React Component as default export in
pages/__generated__/pages_indexQuery.graphql
* Example with-relay-modern: update dependencies
* Example with-react-relay-network-modern: fix prettier errors
Update examples with-relay-modern and with-relay-modern-server-express to react-relay 2.0.0
- react-relay has started to use new Context API instead of Legacy Context API
- add `parseInt` because graphql 14.0.0 introduced stricter scalar value coercion
Closes#6157
I wrote a [script](https://github.com/j0lv3r4/dependency-version-updater) to update dependencies recursively in `package.json` files, e.g.:
```
$ node index.js --path="./examples" --dependencies="react=^16.7.0,react-dom=^16.7.0"
```
This PR contains the result against the examples folder.
* Fix with-relay-modern example
Starting with react-relay 1.5.0 the schema canno't be in the same dir as
the src. This can be fixed by excluding the schema dir. Globs should
also be inside quotation marks, to avoid non-deterministic behavior of
different shells.
* Add missing key on BlogPosts