wiremock / wiremock-graphql-extension

GraphQL extension for WireMock
MIT License
22 stars 4 forks source link

Using response templating with graphql requests #23

Open UltimateLobster opened 1 month ago

UltimateLobster commented 1 month ago

Proposal

I'm kinda new to wiremock so it may be already possible, but I wish to be able to use response templating when working with graphql stubs.

However, I don't see anyway in which I can access certain parts of the graphql body without parsing it myself. Are there builtin helpers that allow me to do this? If not, would it be possible to add these?

I imagine it as something like a request.graphql.variables which can be used in the response template to fetch the variables used for the graphql query.

References

No response

nilwurtz commented 9 hours ago

Sorry for the late response.

I believe implementing this feature would be quite challenging for this extension, as it would require communication between multiple extensions.