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

Webhook to gRPC handler #3984

Closed
gsingh-ds opened this issue May 29, 2022 · 8 comments
Closed

Webhook to gRPC handler #3984

gsingh-ds opened this issue May 29, 2022 · 8 comments

Comments

@gsingh-ds
Copy link

Question: I see that GraphQL can handle REST webhooks and there are some examples around pub/sub method of handling request. Is there way to forward webhook request to gRPC handler? I did not see any documentation regarding that.

@gsingh-ds
Copy link
Author

@ardatan Help?

@ardatan
Copy link
Owner

ardatan commented Jun 7, 2022

If I understand correctly, this is not related to GraphQL actually. Basically you can implement a REST endpoint that forwards data to your gRPC source.

@ardatan
Copy link
Owner

ardatan commented Jul 20, 2022

Closing this issue due to the inactivity.

@ardatan ardatan closed this as completed Jul 20, 2022
@theguild-bot theguild-bot mentioned this issue Aug 11, 2022
@gsingh-ds
Copy link
Author

@ardatan What you mentioned in the last post, that's what we end up building. But I feel like there must a better way to do this. As graphql can handle any http request then forwarding it to grpc though pub/sub should be possible right?

@ardatan
Copy link
Owner

ardatan commented Aug 23, 2022

GraphQL is not responsible of handling "any" HTTP request, and GraphQL Mesh doesn't forward requests.
Your GraphQL server takes HTTP requests per GraohQL over HTTP spec, and the server executes that query on your schema, then the schema(Mesh in this case) calls gRPC client to get the requested data so there is no forwarding or HTTP handling done by GraphQL or GraphQL Mesh.

@gsingh-ds
Copy link
Author

gsingh-ds commented Aug 24, 2022

I am little confused. Here https://www.the-guild.dev/blog/graphql-mesh-subscriptions. Can't forward the response from webhook to grpc or to RabbitMQ? We are trying to handle Strip webhooks and only exposed endpoint we have is GraphQL Mesh.

@ardatan
Copy link
Owner

ardatan commented Aug 24, 2022

That documentation explains how to consume Webhooks as GraphQL subscriptions. So basically, you listen webhook calls and allow user to get it using GraphQL Subscription requests.

@gsingh-ds
Copy link
Author

gsingh-ds commented Dec 2, 2022

Quick question @ardatan : Our use case is this: we have stripe account, we want to consume stripe events with our webhook. First is this possible to do with graphql mesh and then publish that message to rabbitmq.
stripe_event -> graphql_mesh_subscription -> rabbitmq

@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
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

No branches or pull requests

2 participants