juancastillo0 / leto

Dart GraphQL server libraries. Utilities, code generator, examples and reference implementation.
https://juancastillo0.github.io/leto/
MIT License
38 stars 6 forks source link

Update object params values when variables #6

Closed warrenisarobot closed 1 year ago

warrenisarobot commented 1 year ago

variable.name is a NamedNode type, but the variables array keys are Strings of the name of the variable. This causes any variables to not be replaced correctly when they are used in an Object.

Updated to use the value of the NamedNode which can be looked up in the variables Map.

juancastillo0 commented 1 year ago

Hi, thank you so much for the PR!

This is great, I will add some tests for this use case. However, I will merge this right away and leave the issue open for the tests.

Bummer that Dart's Map[] is not typed, not sure if there is a linter to make sure something like this is not happening in other parts of the codebase. I will investigate, maybe https://dartcodemetrics.dev/.

Thanks again

warrenisarobot commented 1 year ago

@juancastillo0 Thanks for this package, it is super helpful! Glad I could help in a small way.