@cedarjs/realtime 2.6.1-next.0 → 2.7.0-rc.107
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.
|
@@ -11,7 +11,7 @@ export { Repeater } from 'graphql-yoga';
|
|
|
11
11
|
* But not fully supported in TS
|
|
12
12
|
* {
|
|
13
13
|
* schema: DocumentNode // <-- required
|
|
14
|
-
* [string]:
|
|
14
|
+
* [string]: CedarSubscription
|
|
15
15
|
* }
|
|
16
16
|
*
|
|
17
17
|
* Note: This type is duplicated from packages/graphql-server/src/subscriptions/makeSubscriptions
|
|
@@ -47,8 +47,8 @@ export type CedarRealtimeOptions = {
|
|
|
47
47
|
enableDeferStream?: boolean;
|
|
48
48
|
liveQueries?: {
|
|
49
49
|
/**
|
|
50
|
-
* @description Cedar Realtime supports in-memory and Redis stores.
|
|
51
|
-
*
|
|
50
|
+
* @description Cedar Realtime supports in-memory and Redis stores. If no
|
|
51
|
+
* `store` is configured, live queries will be disabled.
|
|
52
52
|
*/
|
|
53
53
|
store: 'in-memory' | {
|
|
54
54
|
redis: {
|
|
@@ -64,8 +64,8 @@ export type CedarRealtimeOptions = {
|
|
|
64
64
|
};
|
|
65
65
|
subscriptions?: {
|
|
66
66
|
/**
|
|
67
|
-
* @description Cedar Realtime supports in-memory and Redis stores.
|
|
68
|
-
*
|
|
67
|
+
* @description Cedar Realtime supports in-memory and Redis stores. If no
|
|
68
|
+
* `store` is configured, subscriptions will be disabled.
|
|
69
69
|
*/
|
|
70
70
|
store: 'in-memory' | {
|
|
71
71
|
redis: {
|
package/dist/index.js
CHANGED
|
@@ -94,9 +94,7 @@ var useCedarRealtime = (options) => {
|
|
|
94
94
|
if (options.liveQueries.store === "in-memory") {
|
|
95
95
|
liveQueriesEnabled = true;
|
|
96
96
|
liveQueryStore = inMemoryLiveQueryStore;
|
|
97
|
-
liveQueryPlugin = (0, import_live_query.useLiveQuery)({
|
|
98
|
-
liveQueryStore
|
|
99
|
-
});
|
|
97
|
+
liveQueryPlugin = (0, import_live_query.useLiveQuery)({ liveQueryStore });
|
|
100
98
|
} else if (options.liveQueries.store.redis) {
|
|
101
99
|
liveQueriesEnabled = true;
|
|
102
100
|
liveQueryStore = new RedisLiveQueryStore(
|
|
@@ -112,7 +110,7 @@ var useCedarRealtime = (options) => {
|
|
|
112
110
|
throw new Error("Invalid live query store configuration.");
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
|
-
if (options.subscriptions) {
|
|
113
|
+
if (options.subscriptions?.store) {
|
|
116
114
|
if (options.subscriptions.store === "in-memory") {
|
|
117
115
|
subscriptionsEnabled = true;
|
|
118
116
|
pubSub = (0, import_subscription.createPubSub)();
|
|
@@ -123,6 +121,8 @@ var useCedarRealtime = (options) => {
|
|
|
123
121
|
subscribeClient: options.subscriptions.store.redis.subscribeClient
|
|
124
122
|
});
|
|
125
123
|
pubSub = (0, import_subscription.createPubSub)({ eventTarget });
|
|
124
|
+
} else {
|
|
125
|
+
throw new Error("Invalid subscriptions store configuration.");
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/realtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0-rc.107",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"@graphql-yoga/subscription": "5.0.5",
|
|
32
32
|
"@n1ru4l/graphql-live-query": "0.10.0",
|
|
33
33
|
"@n1ru4l/in-memory-live-query-store": "0.10.0",
|
|
34
|
-
"graphql": "16.
|
|
34
|
+
"graphql": "16.13.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@cedarjs/framework-tools": "2.
|
|
38
|
-
"@envelop/core": "5.5.
|
|
37
|
+
"@cedarjs/framework-tools": "2.7.0-rc.107",
|
|
38
|
+
"@envelop/core": "5.5.1",
|
|
39
39
|
"@envelop/testing": "7.0.0",
|
|
40
40
|
"@envelop/types": "5.2.1",
|
|
41
|
-
"ioredis": "5.9.
|
|
42
|
-
"nodemon": "3.1.
|
|
41
|
+
"ioredis": "5.9.3",
|
|
42
|
+
"nodemon": "3.1.14",
|
|
43
43
|
"tsx": "4.21.0",
|
|
44
44
|
"typescript": "5.9.3",
|
|
45
45
|
"vitest": "3.2.4"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "e4c28ed97a1f4859162b32aaede569ab4412e06b"
|
|
59
59
|
}
|