Mirror: TypeScript LSP plugin that finds GraphQL documents in your code and provides diagnostics, auto-complete and hover-information.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update README.md

authored by

Jovi De Croock and committed by
GitHub
7afa7461 2b641c51

+3 -15
+3 -15
packages/graphqlsp/README.md
··· 87 87 ## Tracking unused fields 88 88 89 89 Currently the tracking unused fields feature has a few caveats with regards to tracking, first and foremost 90 - it will only track in the same file to encourage [fragment co-location](https://www.apollographql.com/docs/react/data/fragments/#colocating-fragments). 91 - Secondly it supports a few patterns which we'll add to as time progresses: 92 - 93 - ```ts 94 - // Supported cases: 95 - const result = (await client.query()) || useFragment(); 96 - const [result] = useQuery(); // --> urql 97 - const { data } = useQuery(); // --> Apollo 98 - const { field } = useFragment(); 99 - const [{ data }] = useQuery(); 100 - const { 101 - data: { pokemon }, 102 - } = useQuery(); 103 - ``` 90 + it will only track the result and the accessed properties in the same file to encourage 91 + [fragment co-location](https://www.apollographql.com/docs/react/data/fragments/#colocating-fragments). 104 92 105 - Lastly we don't track mutations/subscriptions as some folks will add additional fields to properly support 93 + Secondly, we don't track mutations/subscriptions as some folks will add additional fields to properly support 106 94 normalised cache updates. 107 95 108 96 ## Fragment masking