Replies: 2 comments
-
@angristan Can you check my comment here : #2483 (comment) is this what you're trying to do ? Because in the current behavior you can set @modify on an input field and it will work just fine |
Beta Was this translation helpful? Give feedback.
0 replies
-
Proposing the following feature here: Hope that helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The main issue I'm facing is for serialization.
Serializing
For example when I want to serialize my input schema as the body of a POST HTTP request:
The input will be serialiezed as
{"emailAddress":"test@example.com"}
, but I wantemail_address
as this is what my API expects.body: "{ \"email_address\": \"{{.args.input.emailAddress}}\" }"
but this is ugly and gets tedious for large payloads@modify
directive can help hereIs there any other way?
Deserializing
Let's say my API returns:
And my schema is:
Then
emailAddress
would benull
or would fail if it was of typeString!
.Thus, I need to do:
which breaks camel case consistency.
To still be able to query the
emailAddress
field in my GraphQL schema as camel case, I found these solutions:Which are OK, but I feel like there could be a more elegant/automated solution to specify the case 🤔
Beta Was this translation helpful? Give feedback.
All reactions