## Description
This PR ensures that the default prettier config is used for examples
and templates.
This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).
## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)
## Related
- Fixes#54402
- Closes#54409
Improve the Next.js with TypeScript + GraphQL example:
- [x] use GraphQL Code Generator instead of `graphql-let`: more widespread tool and smaller bundle size (types only generation vs code generation)
- [x] use GraphQL Yoga instead of Apollo Server Micro: for lighter bundle size as [stated here](https://github.com/vercel/next.js/pull/36155)
- [x] introduces GraphQL Code Generator on the API side for Resolvers typing
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
* Update deps
* Run "node-check-update -u"
* "graphql" keeps ^14 since other libs expect it
* Install apollo-link and apollo-cache because @apollo/react-common
wants it as peer-deps
* Add graphql-let/schema/loader
* This enables HMR from modifying *.graphqls.
* Add resolver context
* Remove JSDoc, respect TypeScript defs
* ncu -u
* Keep using graphql@^14.6.0 for the other deps
* fix: Migrate to graphql-let@0.10.0
* Removed duplicated deps
* Updated check
Co-authored-by: Luis Alvarez <luis@zeit.co>
* New example with-typescript-graphql
* Update newer graphql-let
* Apply @lfades 's suggestions
* Use "lib" for tools directory
* Move config decorator to next.config.js
* Apply stricter tsconfig
* mod: hide the word "apollo" from users
* mod: Use variable name `withApollo`
* Use the later version of graphql-let
* Only pages can be in pages
* Life improvements
* fix: .grpahql-let.yml point to the wrong document path
* Use a wider glob for less pitfalls
* Add a note about it in README.md
Co-authored-by: Luis Alvarez D. <luis@zeit.co>