graphql-client
graphql-client copied to clipboard
Generate `From<Variables>` implementation for `QueryBody<Variables>`
Basically subject.
I may be missing something, but I don't see why this won't work.
Variables
structures are generated in a closed module alongside OPERATION_NAME
and QUERY
strings, which means that:
- association of
Variables
with it'sOPERATION_NAME
andQUERY
is obvious and unambiguous - it's impossible to implement this
From
in the user code due to orphan rules
It's not the most desperately needed trait-impl, but it would allow to properly generalize QueryBody
construction over Variables
in user code, which would be nice.
I may be missing something
If there are actually no reasons to not do it just let me know I'll pop a PR on weekends.