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

Add GraphQL Subscription Example #25

Open
chuck-alt-delete opened this issue Jun 27, 2023 · 3 comments
Open

Add GraphQL Subscription Example #25

chuck-alt-delete opened this issue Jun 27, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@chuck-alt-delete
Copy link
Contributor

Related to #10 . It seems like GraphQL subscriptions and Materialize fit like hand in glove. We should add an example GraphQL API that allows end users to subscribe to views in Materialize.

@chuck-alt-delete chuck-alt-delete added the enhancement New feature or request label Jun 27, 2023
@benesch
Copy link
Member

benesch commented Jun 27, 2023

Indeed, although the tricky part is writing the backend code that converts an arbitrary GraphQL subscription to the appropriate Materialize SUBSCRIBE command while handling auth, etc.

@benesch
Copy link
Member

benesch commented Jun 28, 2023

One thing to note: GraphQL subscriptions aren't a standardized thing. In particular they don't offer any help with update framing—no specification of e.g. "this is how you represent a delete vs an insert vs an update." Every client and server has a different take on how to communicate updates. So we'd have to invent or repurpose one of the existing protocols for this.

@chuck-alt-delete
Copy link
Contributor Author

chuck-alt-delete commented Jun 30, 2023

Turns out this was exactly what I was looking for:

this opens up a new question for me about how to better surface both connection-examples and demos repos in the docs to to make it much easier for someone to search something like “materialize graphql” and get to that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants