apollo
apollo copied to clipboard
Seconds scalar not working
Hi folks, I'm trying to pass an int value as seconds scalar to my graphql-backend.
My mutation looks like
updateS(
sId: ID = null
s: s = null
): SType
My input type s looks like
type s {
s: Seconds = null
}
And my SType looks like
type SType {
s: Seconds
}
Example call (via playground)
mutation {
updateS(s: "08d924e8-69fb-425c-8130-de7342a2ca2a", s: {
s: 3600
}) {
s
}
}
This is the payload from chrome when I call the mutation in my vue-app:
{"operationName":"updateS","variables":{"sId":"08d924e8-69fb-425c-8130-de7342a2ca2a","s":{"s":3600}},"query":"mutation updateS($sId: ID!, $s: s!) {\n updateS(sId: $sId, s: $s) {\n s\n__typename\n }\n}\n"}
When I call the mutation via playground, everything works fine. Neither does my vue app throw any error/exception nor works the mutation. The mutation is called in the backend, but the value for s
is null (and so 00:00:00 as it is a TimeSpan). The backend is written in dotnet core 3.1 but as I said the convertion from a given number to TimeSpanSecondsGraphType works via playground. Any suggestion?
Thanks in advance!