+5
.changeset/tender-files-tie.md
+5
.changeset/tender-files-tie.md
+1
docs/api/graphcache.md
+1
docs/api/graphcache.md
···| `optimistic` | A mapping of mutation fields to resolvers that may be used to provide _Graphcache_ with an optimistic result for a given mutation field that should be applied to the cached data temporarily. || `schema` | A serialized GraphQL schema that is used by _Graphcache_ to resolve partial data, interfaces, and enums. The schema also used to provide helpful warnings for [schema awareness](../graphcache/schema-awareness.md). || `storage` | A persisted storage interface that may be provided to preserve cache data for [offline support](../graphcache/offline.md). |The `@urql/exchange-graphcache` package also exports the `offlineExchange`; which is identical tothe `cacheExchange` but activates [offline support](../graphcache/offline.md) when the `storage` option is passed.
···| `optimistic` | A mapping of mutation fields to resolvers that may be used to provide _Graphcache_ with an optimistic result for a given mutation field that should be applied to the cached data temporarily. || `schema` | A serialized GraphQL schema that is used by _Graphcache_ to resolve partial data, interfaces, and enums. The schema also used to provide helpful warnings for [schema awareness](../graphcache/schema-awareness.md). || `storage` | A persisted storage interface that may be provided to preserve cache data for [offline support](../graphcache/offline.md). |The `@urql/exchange-graphcache` package also exports the `offlineExchange`; which is identical tothe `cacheExchange` but activates [offline support](../graphcache/offline.md) when the `storage` option is passed.
+10
-5
exchanges/graphcache/src/ast/schemaPredicates.test.ts
+10
-5
exchanges/graphcache/src/ast/schemaPredicates.test.ts
······'The type `SomeInvalidType` is not an object in the defined schema, but the GraphQL document is traversing it.\nhttps://bit.ly/2XbVrpR#3'···
······'The type `SomeInvalidType` is not an object in the defined schema, but the GraphQL document is traversing it.\nhttps://bit.ly/2XbVrpR#3'···
+43
-25
exchanges/graphcache/src/ast/schemaPredicates.ts
+43
-25
exchanges/graphcache/src/ast/schemaPredicates.ts
······························`Invalid resolver: \`${name}\` is not in the defined schema, but the \`resolvers\` option is referencing it.`,`Invalid resolver: \`${name}\` does not match to a concrete type in the schema, but the \`resolvers\` option is referencing it. Implement the resolver for the types that ${············`Invalid optimistic mutation field: \`${mutation}\` is not a mutation field in the defined schema, but the \`optimistic\` option is referencing it.`,
······························`Invalid resolver: \`${name}\` is not in the defined schema, but the \`resolvers\` option is referencing it.`,`Invalid resolver: \`${name}\` does not match to a concrete type in the schema, but the \`resolvers\` option is referencing it. Implement the resolver for the types that ${············`Invalid optimistic mutation field: \`${mutation}\` is not a mutation field in the defined schema, but the \`optimistic\` option is referencing it.`,
+11
-2
exchanges/graphcache/src/helpers/help.ts
+11
-2
exchanges/graphcache/src/helpers/help.ts
······
······
+25
-12
exchanges/graphcache/src/operations/query.ts
+25
-12
exchanges/graphcache/src/operations/query.ts
············`A resolver and directive is being used at "${typename}.${fieldName}" simultaneously. Only the directive will apply.`,························
············`A resolver and directive is being used at "${typename}.${fieldName}" simultaneously. Only the directive will apply.`,························
+18
-7
exchanges/graphcache/src/operations/write.ts
+18
-7
exchanges/graphcache/src/operations/write.ts
············"If you're writing to the cache manually have to pass a `__typename` property on each entity in your data.",·········
············"If you're writing to the cache manually have to pass a `__typename` property on each entity in your data.",·········
+8
-4
exchanges/graphcache/src/store/store.ts
+8
-4
exchanges/graphcache/src/store/store.ts
············
············
+13
exchanges/graphcache/src/types.ts
+13
exchanges/graphcache/src/types.ts
···+/** Configure a custom-logger for graphcache, this function wll be called with a severity and a message.+* By default we will invoke `console.warn` for warnings during development, however you might want to opt+* out of this because you are re-using urql for a different library. This setting allows you to stub the logger/** Configures update functions which are called when the mapped fields are written to the cache.