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

Allow WebsocketInitFunc to add payload to Ack #4

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

telemenar
Copy link

@telemenar telemenar commented Sep 8, 2023

The connection ACK message in the protocol for both graphql-ws and graphql-transport-ws allows for a payload in the connection ack message.

We really wanted to use this to establish better telemetry in our use of websockets in graphql.

Describe your PR and link to any relevant issues.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

Pull Request Test Coverage Report for Build 6127014767

  • 10 of 11 (90.91%) changed or added relevant lines in 1 file are covered.
  • 8 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+3.6%) to 79.266%

Changes Missing Coverage Covered Lines Changed/Added Lines %
graphql/handler/transport/websocket.go 10 11 90.91%
Files with Coverage Reduction New Missed Lines %
codegen/config/binder.go 2 76.56%
codegen/object.go 2 68.57%
codegen/field.go 4 73.15%
Totals Coverage Status
Change from base Build 6125705254: 3.6%
Covered Lines: 6759
Relevant Lines: 8527

💛 - Coveralls

The connection ACK message in the protocol for both
graphql-ws and graphql-transport-ws allows for a payload in the
connection ack message.

We really wanted to use this to establish better telemetry in our use of
websockets in graphql.
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

Pull Request Test Coverage Report for Build 6127045929

  • 10 of 11 (90.91%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.009%) to 75.686%

Changes Missing Coverage Covered Lines Changed/Added Lines %
graphql/handler/transport/websocket.go 10 11 90.91%
Files with Coverage Reduction New Missed Lines %
codegen/templates/templates.go 2 77.13%
Totals Coverage Status
Change from base Build 6125705254: -0.009%
Covered Lines: 6761
Relevant Lines: 8933

💛 - Coveralls

@telemenar telemenar merged commit da137ea into master Sep 12, 2023
34 checks passed
telemenar added a commit that referenced this pull request Sep 29, 2023
* Allow WebsocketInitFunc to add payload to Ack

The connection ACK message in the protocol for both
graphql-ws and graphql-transport-ws allows for a payload in the
connection ack message.

We really wanted to use this to establish better telemetry in our use of
websockets in graphql.

* Fix lint error in test

* Switch argument ordering.

---------

Co-authored-by: Chris Pride <cpride@observeinc.com>
@telemenar telemenar deleted the addConnectionAckPayload branch September 29, 2023 18:22
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.

2 participants