v1.3.0
This is a significant release that contains a new execution pipeline and important fixes to the query planner.
New Execution Pipeline
The code that receives the query plan and executes it step by step, before forming the response has been completely redone. There were enough significant changes we had planned that a rewrite became the simpler approach. While the changes are significant, they are self generally self contained and do not impact the other parts of bramble. The changes are contained in #74. Thanks to @nmaquet, @segfault88, and @suessflorian for the help on these.
Goals for the new pipeline
- Handle the bugs that were cropping up when marshalling the merged result back into JSON. The previous approach of using the merged execution result to create the JSON was proving problematic when the shape of the results started to diverge from the request document. This was especially apparent when dealing with fragments and where most of the issues were contained. The new approach instead uses the GraphQL request document to guide the creation of the JSON response, which removes an entire class of bugs.
- Remove any mutable state between the various execution steps. The previous code shared a
map[string]interface{}
that was passed between the steps and merged into step by step. This is now done by passing the responses down a channel and is then merged as a seperate stage after all the steps have been executed. - Deprecate unmaintained code paths.
- Some general maintainability and readability improvements.
Visible Changes
- The planner now injects
__typename
when it encounters fragments, this is to aid in marshalling fragments to JSON. - Support for the
Node
interface federation protocol has been dropped. This was briefly in use internally at Movio before the public release of Bramble. - Support for opentracing has been dropped, this was another code path that had been implemented early on but unused since.
- When using the
X-Bramble-Debug: timing
header, the execution, merging, and marshalling steps are now shown as seperate values.
Query Planning Fixes
Huge thanks to @gmac for these, they are contained in #85 and #81.
Other Changes
- DOC: fixed typo on installation url. by @hsblhsn in #62
- Fix documentation on jwt auth by @seeday in #69
- Give better errors if duplicate boundary query exists by @haydenwoodhead in #55
- Allow specifying the full listen address in config by @pkqk in #70
- Update jwt library by @pkqk in #72
- Add missing dependancies for
gqlgen
server example by @suessflorian in #77 - Buffer
os.Interrupt
channel by @suessflorian in #78 - Update dependencies and update go to 1.17 by @lucianjon in #82
Full Changelog: v1.2.1...v1.3.0