-
Notifications
You must be signed in to change notification settings - Fork 0
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
Subscription supported ? #1
Comments
Hi @gedw99, the problem is that GraphQL doesn't support subscriptions natively (they work like a query/mutation). |
so for example you could use a query to poll into and get a response. Performance would of course not scale. But is that what you mean.. ? |
Can you, please, share some example of how this should work? |
Sorry but there are a ton examples. Google for the 3 architectural solutions. Polling SSE - server side events WS - web sockets. |
As you can find, proto2gql generates only the schema and doesn't care about how it will be executed. So, what proto2gql should generate, to make it possible to handle streams? |
web socket, or grpc-web |
Hey @gedw99, currently I`m working on the next iteration of the generator which will be able to generate full-featured GraphQL API Gateway and there the subscriptions could be included. Please let me know and I will update you as soon as I finish. |
hey @saturn4er sounds pretty nice. your should not reinvent the wheel. Look at: https://github.com/z0mbie42/goes/tree/master/_examples/api Because it is a event source base it makes it much easier to support subscriptions. Anyway if you have examples running i can help you .. |
hey @gedw99, I don't really know what have you tried to make with this tool, and really don't understand what for do I need NATS or DB for subscription. I think it should work in such way: |
Ok i totally get what your saying, and thats pretty obvious stuff. I was just trying to explain how to use it with a event sourcing architecture. This is how you really built a Subscription based system using your current graphql / grpc architecture. You see for subscriptions you need a way to track what each user gets |
I guess because protobuf and grpc does not model subscriptions it's impossible for the graphql to have subscriptions ?
The text was updated successfully, but these errors were encountered: