@graphcommerce/graphql 9.0.4-canary.0 → 9.0.4-canary.2
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 +3 -11
- package/hooks/usePrivateQuery.ts +2 -2
- package/hooks/usePrivateQueryContext.ts +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/hooks/usePrivateQuery.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { useIsSSR } from '@graphcommerce/next-ui/hooks/useIsSsr'
|
|
|
4
4
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
5
5
|
import { getCssFlag, removeCssFlag, setCssFlag } from '@graphcommerce/next-ui/utils/cssFlags'
|
|
6
6
|
import { useContext, useEffect } from 'react'
|
|
7
|
-
import type {
|
|
7
|
+
import type { QueryHookOptions, QueryResult, TypedDocumentNode } from '../apollo'
|
|
8
8
|
import { useQuery } from '../apollo'
|
|
9
9
|
import { PrivateQueryMaskContext } from '../components/PrivateQueryMask/PrivateQueryMask'
|
|
10
10
|
import { usePrivateQueryContext } from './usePrivateQueryContext'
|
|
@@ -32,7 +32,7 @@ export function usePrivateQuery<
|
|
|
32
32
|
document: TypedDocumentNode<Q, V>,
|
|
33
33
|
options: QueryHookOptions<Q, V>,
|
|
34
34
|
unscopedResult: Q,
|
|
35
|
-
): Omit<QueryResult<Q, V>, 'data'> & { data: Q
|
|
35
|
+
): Omit<QueryResult<Q, V>, 'data'> & { data: Q; mask: boolean } {
|
|
36
36
|
const { skip = true } = options
|
|
37
37
|
const context = usePrivateQueryContext()
|
|
38
38
|
const isSsr = useIsSSR()
|
|
@@ -11,7 +11,8 @@ export function getPrivateQueryContext(
|
|
|
11
11
|
/**
|
|
12
12
|
* Defines a method to handle the current context for the query.
|
|
13
13
|
*
|
|
14
|
-
* Other plugins should be able to define their own scopes and create a plugin on this method to
|
|
14
|
+
* Other plugins should be able to define their own scopes and create a plugin on this method to
|
|
15
|
+
* augment the specific scope.
|
|
15
16
|
*
|
|
16
17
|
* @see @graphcommerce/magento-customer/plugins/magentoCustomerGetInContext.ts
|
|
17
18
|
*
|
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": "9.0.4-canary.
|
|
5
|
+
"version": "9.0.4-canary.2",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@apollo/client": "
|
|
16
|
+
"@apollo/client": "3.11.10",
|
|
17
17
|
"@graphql-codegen/add": "5.0.3",
|
|
18
18
|
"@graphql-codegen/fragment-matcher": "5.0.2",
|
|
19
19
|
"@graphql-codegen/introspection": "4.0.3",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"graphql": "^16.10.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.
|
|
31
|
-
"@graphcommerce/graphql-codegen-near-operation-file": "9.0.4-canary.
|
|
32
|
-
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "9.0.4-canary.
|
|
33
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.
|
|
34
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.
|
|
30
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.2",
|
|
31
|
+
"@graphcommerce/graphql-codegen-near-operation-file": "9.0.4-canary.2",
|
|
32
|
+
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "9.0.4-canary.2",
|
|
33
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.2",
|
|
34
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.2",
|
|
35
35
|
"@graphql-mesh/plugin-http-details-extensions": "*",
|
|
36
36
|
"react": "^18.2.0",
|
|
37
37
|
"react-dom": "^18.2.0"
|