Have a requirement to create a VS for a GraphQL request and response. Does DevTest support GraphQL virtualization?
Release : 10.7
Component : DevTest Virtual Service
No supported as of 10.7.x release.
GraphQL virtualization is not supported by DevTest in the released versions but it is available to the Application Test from 10.7. The GraphQL functionality need to be enhanced to support virtualization.
Workaround:
Giving GraphQL query in JSON format then it can works with JSON or REST DPH, means need to make the request as JSON instead of GraphQL.
For example, application/json content type graphql request can be made with the below JSON format:
{
"query": "query HeroNameAndFriends($episode: Episode) { hero(episode: $episode) { name friends { name } } }",
"variables": { "episode": "JEDI" },
"operationName": "HeroNameAndFriends"
}
Changing GraphQL request to JSON then the calls can be virtualized. If support needed for for Content-Type:application/graphql then need to wait for GraphQL virtualization to be supported in DevTest.