@graphql-yoga/plugin-graphql-sse 2.0.3 → 2.0.4-alpha-20230810153432-d9f7d423
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/cjs/index.js +1 -3
- package/esm/index.js +1 -3
- package/package.json +3 -3
- package/typings/index.d.cts +1 -1
- package/typings/index.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -37,9 +37,7 @@ function useGraphQLSSE(options = {}) {
|
|
|
37
37
|
operationName: params.operationName,
|
|
38
38
|
};
|
|
39
39
|
const operation = (0, graphql_1.getOperationAST)(document, params.operationName);
|
|
40
|
-
const executeFn = operation?.operation === 'subscription'
|
|
41
|
-
? enveloped.subscribe
|
|
42
|
-
: enveloped.execute;
|
|
40
|
+
const executeFn = operation?.operation === 'subscription' ? enveloped.subscribe : enveloped.execute;
|
|
43
41
|
return executeFn(executionArgs);
|
|
44
42
|
},
|
|
45
43
|
}, yoga.fetchAPI);
|
package/esm/index.js
CHANGED
|
@@ -34,9 +34,7 @@ export function useGraphQLSSE(options = {}) {
|
|
|
34
34
|
operationName: params.operationName,
|
|
35
35
|
};
|
|
36
36
|
const operation = getOperationAST(document, params.operationName);
|
|
37
|
-
const executeFn = operation?.operation === 'subscription'
|
|
38
|
-
? enveloped.subscribe
|
|
39
|
-
: enveloped.execute;
|
|
37
|
+
const executeFn = operation?.operation === 'subscription' ? enveloped.subscribe : enveloped.execute;
|
|
40
38
|
return executeFn(executionArgs);
|
|
41
39
|
},
|
|
42
40
|
}, yoga.fetchAPI);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-yoga/plugin-graphql-sse",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4-alpha-20230810153432-d9f7d423",
|
|
4
4
|
"description": "GraphQL over Server-Sent Events Protocol plugin for GraphQL Yoga.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"graphql
|
|
7
|
-
"graphql": "
|
|
6
|
+
"graphql": "^15.2.0 || ^16.0.0",
|
|
7
|
+
"graphql-yoga": "4.0.4-alpha-20230810153432-d9f7d423"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"graphql-sse": "^2.0.0"
|
package/typings/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Plugin, YogaInitialContext } from 'graphql-yoga';
|
|
2
1
|
import { HandlerOptions } from 'graphql-sse';
|
|
3
2
|
import { RequestContext } from 'graphql-sse/lib/use/fetch';
|
|
3
|
+
import { Plugin, YogaInitialContext } from 'graphql-yoga';
|
|
4
4
|
export interface GraphQLSSEPluginOptions extends Omit<HandlerOptions<Request, RequestContext, any>, 'validate' | 'execute' | 'subscribe' | 'schema' | 'onSubscribe'> {
|
|
5
5
|
/**
|
|
6
6
|
* Endpoint location where GraphQL over SSE will be served.
|
package/typings/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Plugin, YogaInitialContext } from 'graphql-yoga';
|
|
2
1
|
import { HandlerOptions } from 'graphql-sse';
|
|
3
2
|
import { RequestContext } from 'graphql-sse/lib/use/fetch';
|
|
3
|
+
import { Plugin, YogaInitialContext } from 'graphql-yoga';
|
|
4
4
|
export interface GraphQLSSEPluginOptions extends Omit<HandlerOptions<Request, RequestContext, any>, 'validate' | 'execute' | 'subscribe' | 'schema' | 'onSubscribe'> {
|
|
5
5
|
/**
|
|
6
6
|
* Endpoint location where GraphQL over SSE will be served.
|