@graphcommerce/magento-graphql 9.0.0-canary.80 → 9.0.0-canary.82
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/graphqlErrorByCategory.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -36,6 +36,7 @@ export function graphqlErrorByCategory(
|
|
|
36
36
|
props: GraphQLErrorByCategoryProps | GraphQLErrorByCategoryPropsNoExtract,
|
|
37
37
|
): [ApolloError | undefined, GraphQLError | undefined] {
|
|
38
38
|
const { category, error, extract = true, mask } = props
|
|
39
|
+
|
|
39
40
|
if (!error) return [error, undefined]
|
|
40
41
|
|
|
41
42
|
const newError = new ApolloError({
|
|
@@ -47,7 +48,6 @@ export function graphqlErrorByCategory(
|
|
|
47
48
|
|
|
48
49
|
const graphqlError = error.graphQLErrors.find((err) => err?.extensions?.category === category)
|
|
49
50
|
if (mask && graphqlError) {
|
|
50
|
-
if (graphqlError.extensions?.category) graphqlError.extensions.category = 'masked'
|
|
51
51
|
graphqlError.message = mask
|
|
52
52
|
}
|
|
53
53
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-graphql",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.82",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
|
17
|
-
"@graphcommerce/graphql": "^9.0.0-canary.
|
|
18
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
|
19
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.82",
|
|
17
|
+
"@graphcommerce/graphql": "^9.0.0-canary.82",
|
|
18
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.82",
|
|
19
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.82",
|
|
20
20
|
"next": "*",
|
|
21
21
|
"react": "^18.2.0",
|
|
22
22
|
"react-dom": "^18.2.0"
|