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

Update README.md

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