Team - Please help on this We have a GraphQL API a...
# help
d
Team - Please help on this We have a GraphQL API and I try to set up wiremock for that. While stop recording, I’m getting HTTP 422 error with the below error message. Error : “errors” : [ { “code” : 10, “source” : { }, “title” : “Error parsing JSON”, “detail” : “Unrecognized token ‘query’: was expecting (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’)\n at [Source: (String)\“query userQuery { user(id : \“hghhgghgghh\“) { teamuserinfo }}\“; line: 1, column: 6]” } ] } Is there a way to handle non-json response from the service in wiremock?
b
First of all, there’s no need to repost a question after only 12 hours. Support here is very much on a best effort basis, and people have lives, too. Second, the problem is with the request, not the response (GraphQL responses are pure JSON). It looks like the WireMock recorder has some troubles parsing the recorded GraphQL request. @Lee Turner, do you know if this is an actual gap in WireMock functionality?
d
@Bas Dijkstra - Sorry for that. Since people who posted questions before me and after me got answers so I thought mine got missed out so just reposted.
l
To be honest I am not that familiar with using wiremock with graphql. Are you using the graphql extension ?