+5
.changeset/brave-lamps-punch.md
+5
.changeset/brave-lamps-punch.md
+5
.changeset/rude-waves-check.md
+5
.changeset/rude-waves-check.md
···+Update `formatDocument` to output `FormattedNode` type mapping. The formatter will now annotate added `__typename` fields with `_generated: true`, place selection nodes' directives onto a `_directives` dictionary, and will filter directives to not include `"_"` underscore prefixed directives in the final query. This prepares us for a feature that allows enhanced client-side directives in Graphcache.
+16
-13
exchanges/graphcache/src/ast/node.ts
+16
-13
exchanges/graphcache/src/ast/node.ts
······
+22
-15
exchanges/graphcache/src/ast/traversal.test.ts
+22
-15
exchanges/graphcache/src/ast/traversal.test.ts
············
+39
-41
exchanges/graphcache/src/ast/traversal.ts
+39
-41
exchanges/graphcache/src/ast/traversal.ts
·········
+57
-41
exchanges/graphcache/src/ast/variables.test.ts
+57
-41
exchanges/graphcache/src/ast/variables.test.ts
···························
+25
-22
exchanges/graphcache/src/cacheExchange.ts
+25
-22
exchanges/graphcache/src/cacheExchange.ts
···············
-1
exchanges/graphcache/src/offlineExchange.ts
-1
exchanges/graphcache/src/offlineExchange.ts
+15
-14
exchanges/graphcache/src/operations/query.ts
+15
-14
exchanges/graphcache/src/operations/query.ts
·································
+11
-10
exchanges/graphcache/src/operations/write.ts
+11
-10
exchanges/graphcache/src/operations/write.ts
························
-2
exchanges/graphcache/src/store/store.ts
-2
exchanges/graphcache/src/store/store.ts
······
+4
-3
exchanges/graphcache/src/types.ts
+4
-3
exchanges/graphcache/src/types.ts
·········
+2
-2
packages/core/src/exchanges/cache.ts
+2
-2
packages/core/src/exchanges/cache.ts
······
+36
packages/core/src/types.ts
+36
packages/core/src/types.ts
······
+88
packages/core/src/utils/collectTypenames.test.ts
+88
packages/core/src/utils/collectTypenames.test.ts
···
+30
packages/core/src/utils/collectTypenames.ts
+30
packages/core/src/utils/collectTypenames.ts
···
+150
packages/core/src/utils/formatDocument.test.ts
+150
packages/core/src/utils/formatDocument.test.ts
···
+122
packages/core/src/utils/formatDocument.ts
+122
packages/core/src/utils/formatDocument.ts
···+* @see {@link https://spec.graphql.org/October2021/#sec-Type-Name-Introspection} for more information
+2
-1
packages/core/src/utils/index.ts
+2
-1
packages/core/src/utils/index.ts
···
+1
-1
packages/core/src/utils/request.test.ts
+1
-1
packages/core/src/utils/request.test.ts
···
-201
packages/core/src/utils/typenames.test.ts
-201
packages/core/src/utils/typenames.test.ts
···
-125
packages/core/src/utils/typenames.ts
-125
packages/core/src/utils/typenames.ts
···-* @returns a copy of the passed {@link DocumentNode} with added `__typename` introspection fields.-* @see {@link https://spec.graphql.org/October2021/#sec-Type-Name-Introspection} for more information
+6
-4
scripts/rollup/config.mjs
+6
-4
scripts/rollup/config.mjs
······