movio / bramble

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

Add WrapGraphQLClientTransport to Plugin API #152

Closed nmaquet closed 2 years ago

nmaquet commented 2 years ago

This PR adds a WrapGraphQLClientTransport method to the Plugin API. This allows plugins to hook into the outbound GraphQL request flow of Bramble to perform tasks such as tracing / logging / etc.

This PR also adds a InterceptRequest method to the Plugin API. This allows plugins to get notified each time Bramble serves a GraphQL query.

codecov-commenter commented 2 years ago

Codecov Report

Merging #152 (5b7e016) into main (6cfb4cd) will increase coverage by 0.00%. The diff coverage is 33.33%.

@@           Coverage Diff           @@
##             main     #152   +/-   ##
=======================================
  Coverage   70.29%   70.30%           
=======================================
  Files          25       25           
  Lines        2626     2640   +14     
=======================================
+ Hits         1846     1856   +10     
- Misses        660      664    +4     
  Partials      120      120           
Impacted Files Coverage Δ
config.go 6.81% <0.00%> (ø)
plugin.go 0.00% <0.00%> (ø)
client.go 81.53% <50.00%> (-1.01%) :arrow_down:
execution.go 77.67% <50.00%> (-0.19%) :arrow_down:
auth.go 88.53% <0.00%> (-0.64%) :arrow_down:
query_execution.go 77.47% <0.00%> (+0.47%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6cfb4cd...5b7e016. Read the comment docs.