Closed bdaniel7 closed 2 years ago
Hi @bdaniel7, can you please a bit more information about your query:
I see something interesting, the type Imo
, is that a custom scalar? Because custom scalars are usually strings but in your query without parameters, it looks like it is an integer, maybe that's the issue?
I'm targeting F#.
The error from server is {"errors":[{"message":"400: Bad Request","extensions":{"code":"INTERNAL_SERVER_ERROR"}}]}
The Imo is a scalar
"Vessel's Imo number"
scalar Imo
Indeed, in Postman when I use the variable {"imo": 9758428} it works, when I use it { "imo": "9758428" } I'm getting the Bad request error.
So I've changed the definition of type InputVariables = { imo: string } to { imo: int } and now it works.
Custom scalars are almost always strings unless they are known custom scalars such as BigFloat, Decimal, DateTimeOffset etc. So your server has to accept strings or be able to convert the string value to the required type (string
to int
in your case)
When I'm using a query with parameters, I'm getting an error:
{ message = "400: Bad Request" }
When I'm not using parameters, that errors is gone, test is green.
So maybe the resulting query text is not correctly generated. From Fiddler I see that the generated query looks like in the attached file: query.txt