wundergraph / graphql-go-tools

GraphQL Router / API Gateway framework written in Golang, focussing on correctness, extensibility, and high-performance. Supports Federation v1 & v2, Subscriptions & more.
https://graphql-api-gateway.com
MIT License
685 stars 129 forks source link

fix: ensure tools are freed on panic #872

Closed StarpTech closed 1 month ago

StarpTech commented 1 month ago

This PR ensures that we return the tools in a panic scenario. Calling r.putTools is enough to enforce this. Has been tested manually but is too hard to test in code.