Skip to content

Commit

Permalink
Subscription Fixes (#2065)
Browse files Browse the repository at this point in the history
* fix(playground): enable subscriptions in graphiql

* fix(cli): pass schema to ws server

* fix(serve): fix subscriptions
df0af9b

* Fixes

Co-authored-by: Arda TANRIKULU <[email protected]>
  • Loading branch information
ntziolis and ardatan committed May 1, 2021
1 parent 73cca9e commit ba50211
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-onions-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-mesh/cli': patch
---

fix(serve): fix subscriptions
4 changes: 3 additions & 1 deletion examples/json-schema-fhir/tests/json-schema-fhir.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
const { findAndParseConfig } = require('@graphql-mesh/config');
const { getMesh } = require('@graphql-mesh/runtime');
const { join, basename } = require('path');
Expand Down Expand Up @@ -26,7 +27,7 @@ function checkPatient(patient) {
expect(typeof addressElement.country).toBe('string');
}
describe.skip('JSON Schema FHIR', () => {
describe('JSON Schema FHIR', () => {
it('should generate correct schema', async () => {
const { schema } = await mesh$;
expect(
Expand Down Expand Up @@ -68,3 +69,4 @@ describe.skip('JSON Schema FHIR', () => {
});
afterAll(() => mesh$.then(mesh => mesh.destroy()));
});
*/
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"cookie-parser": "1.4.5",
"cors": "2.8.5",
"express": "4.17.1",
"graphql-helix": "1.4.0",
"graphql-helix": "1.2.3",
"graphql-upload": "11.0.0",
"graphql-ws": "4.5.0",
"ora": "5.4.0",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/serve/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export async function serveMesh(baseDir: string, argsPort?: number) {

useServer(
{
schema: () => mesh$.then(({ schema }) => schema),
execute: args =>
mesh$.then(({ execute }) => execute(args.document, args.variableValues, args.contextValue, args.rootValue)),
subscribe: args =>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10261,10 +10261,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/graphql-fields/-/graphql-fields-2.0.3.tgz#5e68dff7afbb202be4f4f40623e983b22c96ab8f"
integrity sha512-x3VE5lUcR4XCOxPIqaO4CE+bTK8u6gVouOdpQX9+EKHr+scqtK5Pp/l8nIGqIpN1TUlkKE6jDCCycm/WtLRAwA==

graphql-helix@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/graphql-helix/-/graphql-helix-1.4.0.tgz#2be804371ebc13b4fe243b75387b1ca5cc17b68a"
integrity sha512-pzPq4yzAtCHo9cNyjLAoGx7jIiRGVv3znIxbjA+TN9xFa7uHbjIzH8f5LWsbzCQ6Apeu27olNlctAf4tgvZ7Eg==
graphql-helix@1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/graphql-helix/-/graphql-helix-1.2.3.tgz#eaad4db338e2cdf6f5799478d1b05125ff19cd04"
integrity sha512-psBs23Md/Nt0qsNOv5K+MqqsJ09lTyYtoujGAlFuE1+twUBQiKyanOYk3cqs9BtnJ7JsS+JlsS2/0ceE+20RCA==

graphql-iso-date@^3.6.0:
version "3.6.1"
Expand Down

0 comments on commit ba50211

Please sign in to comment.