@graphcommerce/graphql 6.0.2-canary.13 → 6.0.2-canary.15
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 +4 -0
- package/components/GraphQLProvider.tsx +3 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
HttpLink,
|
|
9
9
|
} from '@apollo/client'
|
|
10
10
|
import type { AppProps } from 'next/app'
|
|
11
|
-
import { useCallback, useEffect, useMemo, useRef } from 'react'
|
|
11
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
12
12
|
import { createCacheReviver } from '../createCacheReviver'
|
|
13
13
|
import { errorLink } from '../errorLink'
|
|
14
14
|
import fragments from '../generated/fragments.json'
|
|
@@ -60,7 +60,7 @@ export function GraphQLProvider(props: GraphQLProviderProps) {
|
|
|
60
60
|
[],
|
|
61
61
|
)
|
|
62
62
|
|
|
63
|
-
const client =
|
|
63
|
+
const [client] = useState(() => {
|
|
64
64
|
const link = ApolloLink.from([
|
|
65
65
|
...(typeof window === 'undefined' ? [errorLink, measurePerformanceLink] : []),
|
|
66
66
|
...linksRef.current,
|
|
@@ -73,7 +73,7 @@ export function GraphQLProvider(props: GraphQLProviderProps) {
|
|
|
73
73
|
|
|
74
74
|
const ssrMode = typeof window === 'undefined'
|
|
75
75
|
return new ApolloClient({ link, cache, name: 'web', ssrMode })
|
|
76
|
-
}
|
|
76
|
+
})
|
|
77
77
|
|
|
78
78
|
useEffect(() => {
|
|
79
79
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
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": "6.0.2-canary.
|
|
5
|
+
"version": "6.0.2-canary.15",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@apollo/client": "^3.7.10",
|
|
17
|
-
"@graphcommerce/graphql-codegen-near-operation-file": "6.0.2-canary.
|
|
18
|
-
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "6.0.2-canary.
|
|
17
|
+
"@graphcommerce/graphql-codegen-near-operation-file": "6.0.2-canary.15",
|
|
18
|
+
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "6.0.2-canary.15",
|
|
19
19
|
"@graphql-codegen/add": "4.0.1",
|
|
20
20
|
"@graphql-codegen/fragment-matcher": "4.0.1",
|
|
21
21
|
"@graphql-codegen/introspection": "3.0.1",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"graphql": "16.6.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@graphcommerce/eslint-config-pwa": "6.0.2-canary.
|
|
33
|
-
"@graphcommerce/prettier-config-pwa": "6.0.2-canary.
|
|
34
|
-
"@graphcommerce/typescript-config-pwa": "6.0.2-canary.
|
|
32
|
+
"@graphcommerce/eslint-config-pwa": "6.0.2-canary.15",
|
|
33
|
+
"@graphcommerce/prettier-config-pwa": "6.0.2-canary.15",
|
|
34
|
+
"@graphcommerce/typescript-config-pwa": "6.0.2-canary.15"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "^18.2.0",
|