@graphcommerce/graphql 3.4.3 → 3.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/createCacheReviver.ts +1 -7
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.4.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1598](https://github.com/graphcommerce-org/graphcommerce/pull/1598) [`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b)]:
|
|
10
|
+
- @graphcommerce/graphql-codegen-near-operation-file@3.0.17
|
|
11
|
+
- @graphcommerce/graphql-codegen-relay-optimizer-plugin@3.0.10
|
|
12
|
+
|
|
13
|
+
## 3.4.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#1587](https://github.com/graphcommerce-org/graphcommerce/pull/1587) [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6) Thanks [@paales](https://github.com/paales)! - Apollo client cache is restored during development when it has encountered a runtime error
|
|
18
|
+
|
|
19
|
+
## 3.4.4
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#1578](https://github.com/graphcommerce-org/graphcommerce/pull/1578) [`49370878a`](https://github.com/graphcommerce-org/graphcommerce/commit/49370878a48b90a4579026a7c56c54f97840cebb) Thanks [@paales](https://github.com/paales)! - Apollo client cache is restored during development when it has encountered a runtime error
|
|
24
|
+
|
|
3
25
|
## 3.4.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/createCacheReviver.ts
CHANGED
|
@@ -7,10 +7,6 @@ import { getTypePoliciesVersion } from './typePolicies'
|
|
|
7
7
|
const APOLLO_CACHE_PERSIST = 'apollo-cache-persist'
|
|
8
8
|
const APOLLO_CACHE_VERSION = 'apollo-cache-version'
|
|
9
9
|
|
|
10
|
-
let persistor: CachePersistor<NormalizedCacheObject> | undefined
|
|
11
|
-
|
|
12
|
-
export const persistCache = () => persistor?.persist()
|
|
13
|
-
|
|
14
10
|
/** Revives the cache from the localStorage if it is available. */
|
|
15
11
|
export function createCacheReviver(
|
|
16
12
|
client: ApolloClient<NormalizedCacheObject>,
|
|
@@ -22,14 +18,12 @@ export function createCacheReviver(
|
|
|
22
18
|
let state = incommingState
|
|
23
19
|
const typePoliciesVersion = getTypePoliciesVersion(policies)
|
|
24
20
|
|
|
25
|
-
if (persistor) return
|
|
26
|
-
|
|
27
21
|
if (typeof window !== 'undefined') {
|
|
28
22
|
try {
|
|
29
23
|
const { cache } = client
|
|
30
24
|
|
|
31
25
|
// todo https://github.com/apollographql/apollo-cache-persist/tree/master/examples/react-native/src/utils/persistence
|
|
32
|
-
persistor = new CachePersistor({
|
|
26
|
+
const persistor = new CachePersistor({
|
|
33
27
|
cache,
|
|
34
28
|
storage: new LocalStorageWrapper(window.localStorage),
|
|
35
29
|
maxSize: false,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/graphql",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "3.4.
|
|
5
|
+
"version": "3.4.6",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -13,24 +13,24 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^4.1.
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.10",
|
|
17
17
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
18
18
|
"@graphcommerce/typescript-config-pwa": "^4.0.4",
|
|
19
19
|
"@playwright/test": "^1.21.1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@apollo/client": "^3.6.9",
|
|
23
|
-
"@graphcommerce/graphql-codegen-near-operation-file": "3.0.
|
|
24
|
-
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "3.0.
|
|
25
|
-
"@graphql-codegen/add": "3.2.
|
|
26
|
-
"@graphql-codegen/fragment-matcher": "3.3.
|
|
27
|
-
"@graphql-codegen/introspection": "2.2.
|
|
28
|
-
"@graphql-codegen/schema-ast": "2.5.
|
|
29
|
-
"@graphql-codegen/typed-document-node": "2.3.
|
|
30
|
-
"@graphql-codegen/typescript": "2.7.
|
|
31
|
-
"@graphql-codegen/typescript-apollo-client-helpers": "2.2.
|
|
32
|
-
"@graphql-codegen/typescript-document-nodes": "2.3.
|
|
33
|
-
"@graphql-codegen/typescript-operations": "2.5.
|
|
23
|
+
"@graphcommerce/graphql-codegen-near-operation-file": "3.0.17",
|
|
24
|
+
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "3.0.10",
|
|
25
|
+
"@graphql-codegen/add": "3.2.1",
|
|
26
|
+
"@graphql-codegen/fragment-matcher": "3.3.1",
|
|
27
|
+
"@graphql-codegen/introspection": "2.2.1",
|
|
28
|
+
"@graphql-codegen/schema-ast": "2.5.1",
|
|
29
|
+
"@graphql-codegen/typed-document-node": "2.3.3",
|
|
30
|
+
"@graphql-codegen/typescript": "2.7.3",
|
|
31
|
+
"@graphql-codegen/typescript-apollo-client-helpers": "2.2.3",
|
|
32
|
+
"@graphql-codegen/typescript-document-nodes": "2.3.3",
|
|
33
|
+
"@graphql-codegen/typescript-operations": "2.5.3",
|
|
34
34
|
"apollo3-cache-persist": "^0.14.1",
|
|
35
35
|
"graphql": "16.5.0"
|
|
36
36
|
},
|