@graphcommerce/graphql 10.1.0-canary.22 → 10.1.0-canary.24
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.1.0-canary.24
|
|
4
|
+
|
|
5
|
+
## 10.1.0-canary.23
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2634](https://github.com/graphcommerce-org/graphcommerce/pull/2634) [`06082ad`](https://github.com/graphcommerce-org/graphcommerce/commit/06082ad47a59217fbdfb24f1a60411e4d0eecd9b) - Make GraphCommerce compatible with Apollo Client 4.2+ by augmenting Apollo's `DefaultOptions` type with the `preview` extension and the SSR clients' `errorPolicy: 'all'` default. ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
10
|
+
|
|
3
11
|
## 10.1.0-canary.22
|
|
4
12
|
|
|
5
13
|
## 10.1.0-canary.21
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apollo Client 4.2+ type augmentations for the GraphCommerce setup.
|
|
3
|
+
*
|
|
4
|
+
* - `DefaultOptions.Input.preview` declares the `preview` extension GraphCommerce stuffs into
|
|
5
|
+
* defaultOptions so it's part of the type instead of needing an `as unknown` cast at every
|
|
6
|
+
* client-construction site.
|
|
7
|
+
* - `DeclareDefaultOptions.Query.errorPolicy: 'all'` opts the SSR clients into errorPolicy 'all'
|
|
8
|
+
* so partial GraphQL responses are returned alongside errors instead of throwing on every
|
|
9
|
+
* field-level error during SSG.
|
|
10
|
+
* - `signatureStyle: 'classic'` keeps the pre-4.2 query result typing (`T` instead of
|
|
11
|
+
* `DeepPartial<T> | undefined`) so the codebase doesn't need an app-wide migration to handle
|
|
12
|
+
* the now-correctly-modelled partial data. This is a deliberate trade-off — TS doesn't model
|
|
13
|
+
* the runtime reality of errorPolicy 'all', but it keeps consumer code ergonomic.
|
|
14
|
+
*/
|
|
15
|
+
import '@apollo/client'
|
|
16
|
+
|
|
17
|
+
declare module '@apollo/client' {
|
|
18
|
+
namespace ApolloClient {
|
|
19
|
+
namespace DefaultOptions {
|
|
20
|
+
interface Input {
|
|
21
|
+
preview: unknown
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
namespace DeclareDefaultOptions {
|
|
25
|
+
interface Query {
|
|
26
|
+
errorPolicy?: 'all'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface TypeOverrides {
|
|
32
|
+
signatureStyle: 'classic'
|
|
33
|
+
}
|
|
34
|
+
}
|
package/index.ts
CHANGED
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": "10.1.0-canary.
|
|
5
|
+
"version": "10.1.0-canary.24",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"rxjs": "^7.8.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@graphcommerce/eslint-config-pwa": "^10.1.0-canary.
|
|
32
|
-
"@graphcommerce/graphql-codegen-near-operation-file": "10.1.0-canary.
|
|
33
|
-
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "10.1.0-canary.
|
|
34
|
-
"@graphcommerce/next-config": "^10.1.0-canary.
|
|
35
|
-
"@graphcommerce/prettier-config-pwa": "^10.1.0-canary.
|
|
36
|
-
"@graphcommerce/typescript-config-pwa": "^10.1.0-canary.
|
|
31
|
+
"@graphcommerce/eslint-config-pwa": "^10.1.0-canary.24",
|
|
32
|
+
"@graphcommerce/graphql-codegen-near-operation-file": "10.1.0-canary.24",
|
|
33
|
+
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "10.1.0-canary.24",
|
|
34
|
+
"@graphcommerce/next-config": "^10.1.0-canary.24",
|
|
35
|
+
"@graphcommerce/prettier-config-pwa": "^10.1.0-canary.24",
|
|
36
|
+
"@graphcommerce/typescript-config-pwa": "^10.1.0-canary.24",
|
|
37
37
|
"@graphql-mesh/plugin-http-details-extensions": "*",
|
|
38
38
|
"react": "^19.2.0",
|
|
39
39
|
"react-dom": "^19.2.0"
|