d-exclaimation / over-layer

A GraphQL over Websocket Stream-based Transport Layer on Akka.
https://overlayer.netlify.app/
Apache License 2.0
2 stars 1 forks source link

Feature Request: Subscription Operation #4

Closed d-exclaimation closed 3 years ago

d-exclaimation commented 3 years ago

Description

Allowing no subscription operation. At the moment, I restrict the transport layer to only accept subscription as non subscription are usually sent via regular HTTP. However, I do think it's very possible to add this capability, not to mention, there are no limitations like what were on Whiskey.

Do note that mutation on subscription probably have less security and more potential exploits and vulnerability. Adding back the security convenience of HTTP over a single web-socket connection would be more work than necessary.

Solution suggestion

Let ProxyServer handle non subscription operations immediately instead of passing down to Envoy as this will be a short lived operation and will not collide with the executor streaming setup on Envoy.

d-exclaimation commented 3 years ago

Plans

Prerequisites

Changes

d-exclaimation commented 3 years ago

Unit Test Addition

Websocket implementation

  1. Able seperate Subscription operation from non Subscription operation out of GQL_START / Subscribe.
  2. Respond properly with no subscription operation.
  3. Send response with proper format GQL_DATA / Next.
  4. Immediately send response of GQL_COMPLETE / Complete for non subscription operation.