@livestore/graphql 0.0.0-snapshot-2b8a9de3ec1a701aca891ebc2c98eb328274ae9e → 0.0.0-snapshot-2c861249e50661661613204300b1fc0d902c2e46
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/package.json +4 -4
- package/src/graphql.ts +3 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/graphql",
|
|
3
|
-
"version": "0.0.0-snapshot-
|
|
3
|
+
"version": "0.0.0-snapshot-2c861249e50661661613204300b1fc0d902c2e46",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
14
14
|
"@opentelemetry/api": "1.9.0",
|
|
15
|
-
"@livestore/common": "0.0.0-snapshot-
|
|
16
|
-
"@livestore/livestore": "0.0.0-snapshot-
|
|
17
|
-
"@livestore/utils": "0.0.0-snapshot-
|
|
15
|
+
"@livestore/common": "0.0.0-snapshot-2c861249e50661661613204300b1fc0d902c2e46",
|
|
16
|
+
"@livestore/livestore": "0.0.0-snapshot-2c861249e50661661613204300b1fc0d902c2e46",
|
|
17
|
+
"@livestore/utils": "0.0.0-snapshot-2c861249e50661661613204300b1fc0d902c2e46"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"graphql": "^16.10.0"
|
package/src/graphql.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'
|
|
2
|
-
import { getDurationMsFromSpan
|
|
2
|
+
import { getDurationMsFromSpan } from '@livestore/common'
|
|
3
3
|
import type { RefreshReason, SqliteDbWrapper, Store } from '@livestore/livestore'
|
|
4
4
|
import { LiveQueries, ReactiveGraph } from '@livestore/livestore/internal'
|
|
5
5
|
import { shouldNeverHappen } from '@livestore/utils'
|
|
@@ -46,7 +46,7 @@ export const queryGraphQL = <
|
|
|
46
46
|
map?: MapResult<TResultMapped, TResult>
|
|
47
47
|
deps?: LiveQueries.DepKey
|
|
48
48
|
} = {},
|
|
49
|
-
): LiveQueries.LiveQueryDef<TResultMapped
|
|
49
|
+
): LiveQueries.LiveQueryDef<TResultMapped> => {
|
|
50
50
|
const documentName = graphql.getOperationAST(document)?.name?.value
|
|
51
51
|
const hash = options.deps
|
|
52
52
|
? LiveQueries.depsToString(options.deps)
|
|
@@ -67,7 +67,6 @@ export const queryGraphQL = <
|
|
|
67
67
|
}),
|
|
68
68
|
label,
|
|
69
69
|
hash,
|
|
70
|
-
queryInfo: { _tag: 'None' },
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
|
|
@@ -75,7 +74,7 @@ export class LiveStoreGraphQLQuery<
|
|
|
75
74
|
TResult extends Record<string, any>,
|
|
76
75
|
TVariableValues extends Record<string, any>,
|
|
77
76
|
TResultMapped extends Record<string, any> = TResult,
|
|
78
|
-
> extends LiveQueries.LiveStoreQueryBase<TResultMapped
|
|
77
|
+
> extends LiveQueries.LiveStoreQueryBase<TResultMapped> {
|
|
79
78
|
_tag: 'graphql' = 'graphql'
|
|
80
79
|
|
|
81
80
|
/** The abstract GraphQL query */
|
|
@@ -90,8 +89,6 @@ export class LiveStoreGraphQLQuery<
|
|
|
90
89
|
|
|
91
90
|
reactivityGraph: LiveQueries.ReactivityGraph
|
|
92
91
|
|
|
93
|
-
queryInfo: QueryInfo.None = { _tag: 'None' }
|
|
94
|
-
|
|
95
92
|
private mapResult
|
|
96
93
|
|
|
97
94
|
constructor({
|