@graphcommerce/graphql 10.0.1-canary.0 → 10.0.1-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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.0.1-canary.2
|
|
4
|
+
|
|
5
|
+
## 10.0.1-canary.1
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2571](https://github.com/graphcommerce-org/graphcommerce/pull/2571) [`2350c13`](https://github.com/graphcommerce-org/graphcommerce/commit/2350c13baab476fde83778e3e0b397f54c0cd7de) - Show loading skeleton when loading and there is no data, but show when there is an error so we dont get in a stuck state. ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
3
11
|
## 10.0.1-canary.0
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -3,7 +3,8 @@ import { cssFlag, cssNotFlag, sxx, useIsSSR } from '@graphcommerce/next-ui'
|
|
|
3
3
|
import type { SkeletonOwnProps, SkeletonProps, SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, Skeleton } from '@mui/material'
|
|
5
5
|
import type { OverrideProps } from '@mui/material/OverridableComponent'
|
|
6
|
-
import React
|
|
6
|
+
import type React from 'react'
|
|
7
|
+
import { createContext, useContext, useMemo } from 'react'
|
|
7
8
|
|
|
8
9
|
type MaskProp = { skeleton?: SkeletonProps }
|
|
9
10
|
|
package/hooks/usePrivateQuery.ts
CHANGED
|
@@ -57,9 +57,10 @@ export function usePrivateQuery<
|
|
|
57
57
|
// If the user is logged in we might need to show a skeleton:
|
|
58
58
|
let mask = isSsr
|
|
59
59
|
if (!isSsr && context) {
|
|
60
|
+
// Show skeleton while loading, but not when there's an error
|
|
60
61
|
mask = !skip
|
|
61
62
|
? !clientQuery.data && !clientQuery.previousData && !clientQuery.error
|
|
62
|
-
: !clientQuery.data
|
|
63
|
+
: !clientQuery.data && !clientQuery.error
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
// If this method is called within an PrivateQueryMask, we skip this complete functionality so we show the parent mask.
|
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.0.1-canary.
|
|
5
|
+
"version": "10.0.1-canary.2",
|
|
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.0.1-canary.
|
|
32
|
-
"@graphcommerce/graphql-codegen-near-operation-file": "10.0.1-canary.
|
|
33
|
-
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "10.0.1-canary.
|
|
34
|
-
"@graphcommerce/next-config": "^10.0.1-canary.
|
|
35
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.1-canary.
|
|
36
|
-
"@graphcommerce/typescript-config-pwa": "^10.0.1-canary.
|
|
31
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.1-canary.2",
|
|
32
|
+
"@graphcommerce/graphql-codegen-near-operation-file": "10.0.1-canary.2",
|
|
33
|
+
"@graphcommerce/graphql-codegen-relay-optimizer-plugin": "10.0.1-canary.2",
|
|
34
|
+
"@graphcommerce/next-config": "^10.0.1-canary.2",
|
|
35
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.1-canary.2",
|
|
36
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.1-canary.2",
|
|
37
37
|
"@graphql-mesh/plugin-http-details-extensions": "*",
|
|
38
38
|
"react": "^19.2.0",
|
|
39
39
|
"react-dom": "^19.2.0"
|