Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does WireMock support Mocking GraphQL APIs

We have multiple micro services which is based on GrapQL and few of them based on REST and each micro service will call multiple other microservices (Java, Spring Boot tech stack). Now we want to write integration testing for this kind of orchestration.

We thought of using WireMock for Stubbing external Micro Services. But does it support GraphQL? As Wirmock will will support REST MS mocking can it be used for Stubbing GraphQL as well when using with Spring Boot?

like image 904
springbootlearner Avatar asked Apr 12 '26 08:04

springbootlearner


1 Answers

Yes, WireMock supports GraphQL. WireMock allows request matching based on almost every bit of data sent in a network request (in the case of GraphQL, most likely the request body), and so you can set up WireMock to respond differently based on the information in the request body.

like image 174
agoff Avatar answered Apr 27 '26 05:04

agoff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!