Skip to content

Subscriptions RFC: Update wording on event stream model#304

Merged
robzhu merged 3 commits into
graphql:masterfrom
robzhu:event_stream_model
May 2, 2017
Merged

Subscriptions RFC: Update wording on event stream model#304
robzhu merged 3 commits into
graphql:masterfrom
robzhu:event_stream_model

Conversation

@robzhu

@robzhu robzhu commented May 1, 2017

Copy link
Copy Markdown
Contributor

Updates wording to use abstract event streams instead of pubsub events. Clarifies relationship between event stream and root field/query variables.

@robzhu robzhu changed the title Event stream model Subscriptions RFC: Update wording on event stream model May 1, 2017

@tcr tcr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few nits.

Comment thread rfcs/Subscriptions.md Outdated
![](subscriptions_01.png)

*Above, the light blue box on the left contains the components for a traditional request/response GraphQL system. The light green box on the right contains the new components needed to support GraphQL Subscriptions.*
*Above, the blue boxes on the left are components needed to support traditional request/response GraphQL system. The green box on the right contains are new components needed to support GraphQL Subscriptions.*

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "contains are"

Comment thread rfcs/Subscriptions.md Outdated
The lifetime of a subscription looks like this:

* **Subscribe:** the Client initializes a subscription by sending a query and its variables to the server. When the Subscription is created, the input query and variables are mapped to a set of events to which the Subscription listens. The server _may_ send an initial response from executing the subscription operation.
* **Subscribe:** the Client initializes a subscription by sending a query and its variables to the server. When the Subscription is created, the input query and variables are mapped to a stream of events to which the Subscription listens. The server _may_ send an initial response from executing the subscription operation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"initial response" -> "initial publish" for consistency?

Comment thread rfcs/Subscriptions.md
**Proposed Solution: GraphQL Subscriptions**

In "GraphQL Subscriptions", clients send the server a GraphQL query and query variables. The server maps these inputs to a set events, and executes the query when the events trigger. This model avoids overpushing/underpushing but requires a GraphQL backend. GraphQL Subscriptions provides an abstraction over individual events and exposes an API where the client subscribes to a query. Compared with existing data-transform pipeline techniques, GraphQL Subscriptions produces privacy-aware, right-sized payloads without pushing business logic to the event/messaging layer.
With "GraphQL Subscriptions", clients send the server a GraphQL query and query variables. The server maps these inputs to an event stream and executes the query when the events trigger. This model avoids overpushing/underpushing but requires a GraphQL backend. GraphQL Subscriptions provides an abstraction over business-domain events and exposes an API where the client subscribes to a query. Compared with existing data-transform pipeline techniques, GraphQL Subscriptions produces privacy-aware, right-sized payloads without pushing business logic to the event/messaging layer.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Compared with existing data-transform pipeline techniques" might not be true reading this RFC in a few years, but I'll allow it

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.

3 participants