Skip to content

Commit c8024ac

Browse files
committed
Fix Example API 7 test
Signed-off-by: Alan Cha <[email protected]>
1 parent f090cfc commit c8024ac

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

packages/openapi-to-graphql/test/example_api7.test.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,39 @@ beforeAll(() => {
6868

6969
subscriptionServer = new SubscriptionServer(
7070
{
71-
execute: (schema: GraphQLSchema, document: DocumentNode) => execute({ schema, document }),
72-
subscribe: (schema: GraphQLSchema, document: DocumentNode) => subscribe({ schema, document }),
71+
execute: (
72+
schema,
73+
document,
74+
rootValue,
75+
contextValue,
76+
variableValues,
77+
operationName
78+
) =>
79+
execute({
80+
schema,
81+
document,
82+
rootValue,
83+
contextValue,
84+
variableValues,
85+
operationName
86+
}),
87+
subscribe: (
88+
schema,
89+
document,
90+
rootValue,
91+
contextValue,
92+
variableValues,
93+
operationName
94+
) => {
95+
return subscribe({
96+
schema,
97+
document,
98+
rootValue,
99+
contextValue,
100+
variableValues,
101+
operationName
102+
})
103+
},
73104
schema,
74105
onConnect: (params, socket, context) => {
75106
// Add pubsub to subscribe context

yarn.lock

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,6 +2814,16 @@ expect@^27.0.6:
28142814
jest-message-util "^27.0.6"
28152815
jest-regex-util "^27.0.6"
28162816

2817+
express-graphql@^0.11.0:
2818+
version "0.11.0"
2819+
resolved "https://registry.yarnpkg.com/express-graphql/-/express-graphql-0.11.0.tgz#48089f0d40074d7783c65ff86dd9cae95afea2ef"
2820+
integrity sha512-IMYmF2aIBKKfo8c+EENBNR8FAy91QHboxfaHe1omCyb49GJXsToUgcjjIF/PfWJdzn0Ofp6JJvcsODQJrqpz2g==
2821+
dependencies:
2822+
accepts "^1.3.7"
2823+
content-type "^1.0.4"
2824+
http-errors "1.8.0"
2825+
raw-body "^2.4.1"
2826+
28172827
express-graphql@^0.12.0:
28182828
version "0.12.0"
28192829
resolved "https://registry.yarnpkg.com/express-graphql/-/express-graphql-0.12.0.tgz#58deabc309909ca2c9fe2f83f5fbe94429aa23df"
@@ -3294,11 +3304,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6
32943304
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
32953305
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
32963306

3297-
graphql-helix@^1.13.0:
3298-
version "1.13.0"
3299-
resolved "https://registry.yarnpkg.com/graphql-helix/-/graphql-helix-1.13.0.tgz#e64dad5ef5f622ef38c97fa033f56f3d953c0104"
3300-
integrity sha512-cqDKMoRywKjnL0ZWCTB0GOiBgsH6d3nU4JGDF6RuzAyd35tmalzKpSxkx3NNp4H5RvnKWnrukWzR51wUq277ng==
3301-
33023307
graphql-mqtt-subscriptions@^1.2.0:
33033308
version "1.2.0"
33043309
resolved "https://registry.yarnpkg.com/graphql-mqtt-subscriptions/-/graphql-mqtt-subscriptions-1.2.0.tgz#479df2ec1e0825024f5097ca827d01ffb36ad5c5"

0 commit comments

Comments
 (0)