This message was deleted.
# introduce-yourself
s
This message was deleted.
🙌 1
u
Welcome @Preethu Kg Let us know if we can help
p
Hey! it would be great if I can get help with graphql mock service implementation using Wiremock. I have couple of operations and type of requests using graphql but when I try to do request validation using bodyPatterns it is not working. Basically when I take the same request from UI and unit test in postman it is working but not from UI
@Uri any reference?
u
Hi WireMock does not support graphql at the moment - it is something that we already started working on adding in the near future
p
Since it's application/json content type probably it should work similar way right? @Uri
Also, I am able to send response without adding any bodypattern check but once I add validations then it's not picking up
t
Hey @Preethu Kg, you can technically serve GraphQL stubs with WireMock. The main limitation is that because GraphQL uses a non-standard JSON superset for request bodies the WireMock JSON parser can’t handle it, which means your only option for matching on it is string/regex comparisons, which can be brittle and hard to write correctly. We plan to add explicit support for the GraphQL request format which means that e.g. JSONPath expressions will work as a means of matching.
k
Hey @Preethu Kg could you please help us with sample call which was not working. Curl ll work for reference.
p
Hey! I added contains request validation and it seems working along with priority. Looks fine as of now
k
We are planning to add support so it ll be helpful there so we don't miss out your usecase.