movio / bramble

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

Dynamic boundary argument #115

Closed gmac closed 2 years ago

gmac commented 2 years ago

As discussed in https://github.com/movio/bramble/issues/97#issuecomment-968905753, this reads the name of each boundary query argument from the schema rather than hard-coding the argument names as id and ids. Now a boundary query naming is freeform so long as the field conforms to the basic signature of input and return:

getMyThings(thingIds: [ID!]!): [Thing]! @boundary

This is an important first step in allowing the federation key to be customized for the graph, per https://github.com/movio/bramble/issues/109.

codecov-commenter commented 2 years ago

Codecov Report

Merging #115 (b5ebf1f) into main (4b3dd2e) will increase coverage by 0.23%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   68.52%   68.75%   +0.23%     
==========================================
  Files          24       24              
  Lines        2618     2612       -6     
==========================================
+ Hits         1794     1796       +2     
+ Misses        689      681       -8     
  Partials      135      135              
Impacted Files Coverage Δ
merge.go 93.54% <100.00%> (ø)
plan.go 83.78% <100.00%> (ø)
query_execution.go 69.83% <100.00%> (ø)
validate.go 81.41% <100.00%> (+0.16%) :arrow_up:
plugins/meta.go 10.07% <0.00%> (+0.54%) :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 4b3dd2e...b5ebf1f. Read the comment docs.

lucianjon commented 2 years ago

@gmac No problems here, lets get it in