graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

How to handle Graphql responses in a different format rather than "data"

Open arekucr opened this issue 2 years ago • 1 comments

from what I see the client expects that the graphql response from the server has a "data" property with the result, what if our API response with a custom format like this, how I can customize it so the Serialization, bc right now I got null in the response.data obj.

This is our graphql response format { "StatusCode": "Success", "ServerName": "NAME", "ClientIP": "SOME IP", "ExecutionTime": "00:00:00.3523738", "Result": { "entities": [ { "Id": 34, "type": "ResultType", "level": "High" } ] } }

arekucr avatar Jun 29 '22 01:06 arekucr

https://spec.graphql.org/October2021/#sec-Data

sungam3r avatar Jun 30 '22 16:06 sungam3r