|
|
|
|
|
by gsvclass
1472 days ago
|
|
You can do this with GraphJin. We support adding custom resolvers currently we have an HTTP resolver built in which allows you to join your DB GraphQL query with a remote HTTP Rest endpoint. For example you want users from your db and their subscription data from Stripe. It works out of the box, GraphJin will write out the correct Rest call using data from the db call eg stripe_customer_id from the db will be inserted into the rest calls. Additionally its smart enough to handle rate limits and parallel fetches if required. Here's an example
https://pkg.go.dev/github.com/dosco/graphjin/core#example-pa... And here's an example of a Redis custom resolver to join with data from Redis.
https://pkg.go.dev/github.com/dosco/graphjin/core#Resolver |
|