@m1212e/rumble 0.14.1 → 0.14.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/out/index.cjs +7 -7
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts +3 -5
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts +3 -5
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +7 -7
- package/out/index.mjs.map +1 -1
- package/package.json +1 -1
package/out/index.cjs
CHANGED
|
@@ -247,7 +247,7 @@ export const schema = ${(0, devalue.uneval)((0, __urql_introspection.minifyIntro
|
|
|
247
247
|
//#endregion
|
|
248
248
|
//#region lib/client/request.ts
|
|
249
249
|
const argsKey = "__args";
|
|
250
|
-
function
|
|
250
|
+
function makeGraphQLQueryRequest({ queryName, input, client, enableSubscription = false }) {
|
|
251
251
|
const otwQueryName = `${(0, es_toolkit.capitalize)(queryName)}Query`;
|
|
252
252
|
const argsString = stringifyArgumentObjectToGraphqlList(input?.[argsKey] ?? {});
|
|
253
253
|
const operationString = (operationVerb) => `${operationVerb} ${otwQueryName} { ${queryName}${argsString} ${input ? `{ ${stringifySelection(input)} }` : ""}}`;
|
|
@@ -271,7 +271,7 @@ function makeGraphQLQuery({ queryName, input, client, enableSubscription = false
|
|
|
271
271
|
Object.assign(promise, observable);
|
|
272
272
|
return promise;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function makeGraphQLMutationRequest({ mutationName, input, client }) {
|
|
275
275
|
const otwMutationName = `${(0, es_toolkit.capitalize)(mutationName)}Mutation`;
|
|
276
276
|
const argsString = stringifyArgumentObjectToGraphqlList(input[argsKey] ?? {});
|
|
277
277
|
const response = (0, wonka.pipe)(client.mutation(`mutation ${otwMutationName} { ${mutationName}${argsString} { ${stringifySelection(input)} }}`, {}), (0, wonka.map)((v) => {
|
|
@@ -284,7 +284,7 @@ function makeGraphQLMutation({ mutationName, input, client }) {
|
|
|
284
284
|
Object.assign(promise, observable);
|
|
285
285
|
return promise;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function makeGraphQLSubscriptionRequest({ subscriptionName, input, client }) {
|
|
288
288
|
const otwSubscriptionName = `${(0, es_toolkit.capitalize)(subscriptionName)}Subscription`;
|
|
289
289
|
const argsString = stringifyArgumentObjectToGraphqlList(input[argsKey] ?? {});
|
|
290
290
|
return (0, wonka.pipe)(client.subscription(`subscription ${otwSubscriptionName} { ${subscriptionName}${argsString} { ${stringifySelection(input)} }}`, {}), (0, wonka.map)((v) => {
|
|
@@ -333,7 +333,7 @@ function stringifyArgumentValue(arg) {
|
|
|
333
333
|
function makeLiveQuery({ urqlClient, availableSubscriptions }) {
|
|
334
334
|
return new Proxy({}, { get: (_target, prop) => {
|
|
335
335
|
return (input) => {
|
|
336
|
-
return
|
|
336
|
+
return makeGraphQLQueryRequest({
|
|
337
337
|
queryName: prop,
|
|
338
338
|
input,
|
|
339
339
|
client: urqlClient,
|
|
@@ -348,7 +348,7 @@ function makeLiveQuery({ urqlClient, availableSubscriptions }) {
|
|
|
348
348
|
function makeMutation({ urqlClient }) {
|
|
349
349
|
return new Proxy({}, { get: (_target, prop) => {
|
|
350
350
|
return (input) => {
|
|
351
|
-
return
|
|
351
|
+
return makeGraphQLMutationRequest({
|
|
352
352
|
mutationName: prop,
|
|
353
353
|
input,
|
|
354
354
|
client: urqlClient
|
|
@@ -429,7 +429,7 @@ const nativeDateExchange = ({ client, forward }) => {
|
|
|
429
429
|
function makeQuery({ urqlClient }) {
|
|
430
430
|
return new Proxy({}, { get: (_target, prop) => {
|
|
431
431
|
return (input) => {
|
|
432
|
-
return
|
|
432
|
+
return makeGraphQLQueryRequest({
|
|
433
433
|
queryName: prop,
|
|
434
434
|
input,
|
|
435
435
|
client: urqlClient,
|
|
@@ -444,7 +444,7 @@ function makeQuery({ urqlClient }) {
|
|
|
444
444
|
function makeSubscription({ urqlClient }) {
|
|
445
445
|
return new Proxy({}, { get: (_target, prop) => {
|
|
446
446
|
return (input) => {
|
|
447
|
-
return
|
|
447
|
+
return makeGraphQLSubscriptionRequest({
|
|
448
448
|
subscriptionName: prop,
|
|
449
449
|
input,
|
|
450
450
|
client: urqlClient
|