movio / bramble

A federated GraphQL API gateway
https://movio.github.io/bramble/
MIT License
497 stars 55 forks source link

allow users to override transport #272

Open benzolium opened 1 month ago

benzolium commented 1 month ago

As I mentioned in https://github.com/movio/bramble/issues/80#issuecomment-2137465210, one could not override default transports now.

With this small change, one could set up own transport, because first transport get's selected: https://github.com/99designs/gqlgen/blob/fb67b709af4f0c5ba6eff8222c728b076a6eb09b/graphql/handler/server.go#L98

It will allow users, for example, to introduce batching with a bramble plugin, as I also mentioned in comment: https://github.com/movio/bramble/issues/80#issuecomment-2137465210.