Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): WebSocket clients mustn't provide connectionParams #4270

Merged
merged 3 commits into from
Aug 10, 2022

Conversation

enisdenjo
Copy link
Collaborator

@enisdenjo enisdenjo commented Aug 10, 2022

Description

Mesh server will fail with TypeError: Cannot read properties of undefined (reading 'headers') if WebSocket clients don't provide any connectionParams at this location:

https://github.com/Urigo/graphql-mesh/blob/a134d17deba62db438d68f1ee81ef4adbcf32691/packages/cli/src/commands/serve/serve.ts#L173

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Start any Mesh server, connect to it using GraphiQL with WebSockets only.

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

The weirdest thing is: why are the connectionParams not considered optional (because they really are and here too)?

@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2022

🦋 Changeset detected

Latest commit: 6074b9b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@graphql-mesh/cli Patch
@graphql-mesh/container Patch
cloudflare-workers Patch
graphql-file-upload-example Patch
grpc-example Patch
grpc-reflection-example Patch
hasura-openbrewery-geodb Patch
hello-world-esm Patch
json-schema-hello-world Patch
json-schema-example Patch
json-schema-fhir Patch
json-schema-subscriptions Patch
mongoose-example Patch
mysql-employees Patch
mysql-rfam Patch
neo4j-example Patch
nextjs-apollo-example Patch
nextjs-sdk-example Patch
odata-microsoft-graph-example Patch
odata-msgraph-programmatic-ts Patch
odata-msgraph-programmatic Patch
odata-trippin-example Patch
javascript-wiki Patch
openapi-jira Patch
typescript-location-weather-example Patch
openapi-stackexchange Patch
openapi-stripe Patch
openapi-subscriptions Patch
openapi-youtrack Patch
postgres-geodb-example Patch
reddit-example Patch
country-info-example Patch
soap-demo Patch
soap-netsuite Patch
spacex-cfw Patch
chinook Patch
thrift-calculator Patch
type-merging-batching-example Patch
federation-gateway Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 10, 2022

@enisdenjo is attempting to deploy a commit to the The Guild Team on Vercel.

A member of the Team first needs to authorize it.

@ardatan ardatan merged commit 90edf18 into ardatan:master Aug 10, 2022
@ardatan
Copy link
Owner

ardatan commented Aug 10, 2022

Thanks @enisdenjo 🙏

@enisdenjo enisdenjo deleted the ws-client-no-connection-params branch August 10, 2022 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants