I require this use-case, where hooks can modify the incoming variables based on logic or contacting external systems. See the test included with the PR for an example.
This could have be achieved by putting the logic in a plugin earlier in the chain than Mercurius, but preventing double query parsing would be difficult, as the hooks need to be query-aware.
I'll admit I don't have a complete understanding of this codebase so forgive me if there are any things I've missed here, it's mainly to frame the requirement I have and start a discussion.
If there is any modifications you'd like here, let me know and I'd be happy to contribute; I can update any documentation as necessary, but wanted to wait until this feature was discussed.
I saw discussions about this on https://github.com/mercurius-js/mercurius/issues/876, which mainly talked about accessing variables, but there is a comment that also mentions updating them.
I require this use-case, where hooks can modify the incoming variables based on logic or contacting external systems. See the test included with the PR for an example.
This could have be achieved by putting the logic in a plugin earlier in the chain than Mercurius, but preventing double query parsing would be difficult, as the hooks need to be query-aware.
I'll admit I don't have a complete understanding of this codebase so forgive me if there are any things I've missed here, it's mainly to frame the requirement I have and start a discussion.
If there is any modifications you'd like here, let me know and I'd be happy to contribute; I can update any documentation as necessary, but wanted to wait until this feature was discussed.