Skip to content

How to put a GraphQL API on Materialize? #13050

Answered by ruf-io
ruf-io asked this question in Q&A
Discussion options

You must be logged in to vote

There are several approaches to this that each come with trade-offs which I'll attempt to call out so that you can look at your specific requirements and decide on a solution that aligns with your needs.

Option One: Custom Node.js Service

If you're only serving very specific GraphQL queries, it might be ideal to write your own API service in Node that takes full advantage of the streaming TAIL features of Materialize.

📖 Example Reference: The App script in this real-time demo app

👍Pros: Full control over how Materialize is queried. Ability to subscribe to updates to a view and use GraphQL streaming to stream updates to the client.
👎Cons: Doesn't scale well if you need to handle a truly di…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ruf-io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant