Hi. I use <https://github.com/netflix/dgs-framewor...
# graphql
s
Hi. I use https://github.com/netflix/dgs-framework/ for client. Client is wrote in Kotlin/Spring Boot. I want to use mock GraphQL server. Should I make object for mock server myself? Or is there any library for mock server wrote in Kotlin/Java?
d
unsure about that one as I haven't used it - I'd assume that yes you would need to mock either the client responses OR use something like wiremock to mock the downstream responses
disclaimer: I am one of the maintainers of
graphql-kotlin
if you were to use
graphql-kotlin-ktor-client
you could use Ktor
MockEngine
as well https://ktor.io/docs/http-client-testing.html
you can also take a look at Square
MockWebServer
https://github.com/square/okhttp/tree/master/mockwebserver
2
s
Thank you. GraphQL is also like an API. Therefore, I might as well use the HTTP Client mock. The library you suggested looks good.