Closed TzDeligoVision closed 3 weeks ago
There is another possible workaround to get back the "data" despite the invalid hasNextPage=null value, if I force the hasNextPage
to be optional with a question mark:
query GetAllThings {
things(
first: 100,
after: null,
) {
items {
Created
}
hasNextPage?
endCursor
}
}
This way we can at least get back the data, however, it is unclear how to "treat" the hasNextPage = null in our data processing.
{
"data": {
"things": {
"items": [
{
"ThingID": xyz,
"Created": "2024-06-27T09:37:51.019Z"
},
...
],
"hasNextPage": null,
"endCursor": "...somecursorInBase64..."
}
}
}
I've reproed this error, continuing investigation
I don't think it's related to datetime2_types
field, since I was able to repro the error without using this field.
What happened?
We attempt to query data from an Azure SQL database table with the GraphQL interface page-by-page. For the repro we simplified the query to only fetch the primary key
ThingID (PK, int, not null)
and theCreated (datetime2(7), null)
fields and removed all filters.We get the following error response with HTTP status 200:
This error result is reproducible as long as we don't change the query above.
However, the result is seemingly unpredictable if we change the number of items requested:
Additional observations/cases:
hasNextPage
andendCursor
fields before theitems {...}
=> suddenly OK with all $first values above => why does this depend on the order of the fields in the query?Created
field from theitems {...}
(query only the ID) => suddenly OK with all $first values above => why only reproducible with the DateTime2 field in the query?ID
field from theitems {...}
(query only the Created) => the same result as before, depending on the $first value => why only reproducible with the DateTime2 field in the query?What might be the root cause of this behaviour? Is it a reliable workaround/fix if we move the paging fields "up" before the items in our queries?
Version
1.1.7
What database are you using?
Azure SQL
What hosting model are you using?
Local (including CLI)
Which API approach are you accessing DAB through?
GraphQL
Relevant log output
Code of Conduct