Update TypeScript documentation - #12835
Conversation
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
6ce8958 to
c16a124
Compare
phryneas
left a comment
There was a problem hiding this comment.
Looking good to me altogether :)
|
|
||
| </Note> | ||
|
|
||
| By default, Apollo Client uses GraphQL Codegen's [fragment masking](https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#fragment-masking) output and orients its masking utility types around this format. If you aren't using GraphQL Codegen to generate your types, or your types are generated in a different format, the default type implementations built into Apollo Client might be incompatible which results in inaccurate types. |
There was a problem hiding this comment.
This "by default" is not correct anymore.
There was a problem hiding this comment.
I swear it was when I wrote this paragraph! 🤣🤣🤣
Let me workshop this a bit.
| > This article assumes your project already uses TypeScript. If not, [configure your project to use TypeScript](https://github.com/Microsoft/TypeScript-React-Conversion-Guide#typescript-react-conversion-guide) or [start a new project](https://create-react-app.dev/docs/adding-typescript/). | ||
|
|
||
| To get started using GraphQL Code Generator, begin by installing the following packages (using Yarn or NPM): | ||
| Install the following packages. This installation assumes you already have [installed `@apollo/client` and its dependencies](../get-started#step-2-install-dependencies). |
There was a problem hiding this comment.
This ends up with a very misleading TOC
That kinda implies we recommend the client preset.
How about
-## Setting up your project
## Setting up GraphQL Codegen
### Recommended starter configuration
### Notes about the Client preset?
Also, we could generally need some more structure - some things are on the same level here when they should probably be nested deeper.
There was a problem hiding this comment.
All that said... do we maybe want to split this page into two?
One "setting up codegen" and one "using AC with TS"?
There was a problem hiding this comment.
Let me start with the suggested change in navigation. I like that a lot and totally agree with you here. I'll time box separating these two into pages and agree it would read better with separate pages. I'll do a separate PR for that so we can at least get something out if we run out of time.
No description provided.