Skip to content

websocket messages interception & manipulation #940

Open

Description

@w0aw

Describe the feature you'd love to see

can we intercept each and every incoming or outgoing websocket messages & manipulate like normal http responses?

use case -
ie. use this proxy as gateway & inspect all graphql subscription messages.( so we can double check user is subscribed to his data only)

let me know if i am at wrong place

Additional context (optional)

existing resource - https://wundergraph.com/blog/quirks_of_graphql_subscriptions_sse_websockets_hasura_apollo_federation_supergraph#manipulating/filtering-graphql-subscription-messages

Activity

  1. EvgeniyaGorobets commented on Dec 5, 2024

    @EvgeniyaGorobets

    Want the same feature but for different reasons. I'm trying to build a local dev environment that (unfortunately) integrates with an external service.

    Current the flow for my http requsts is: local client --> local proxy --> external service --> local server
    I'm trying to emulate the same thing with websockets. The external service allows me to pass an argument that redirects my ws request to my local server. I want to have my proxy intercept websocket messages and add that argument before sending it to the external service. I currently do this in the web app code but I'd much rather have it in the proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions