Hello!
We are making some changes to GraphQL-api. All lists fields and return types will be Non-null. This will also change the returned data, before the lists might have been null, but now they will be changed to empty lists(when there is no data).
This is currently in beta, so I urge you to test your graphql-queries in beta. We are planning to update production in a couple of weeks.
For example, the following query:
trainsByDepartureDate(departureDate: "2024-01-01") {
trainNumber
version
timeTableRows(where: {unknownDelay: {equals: true}}) {
actualTime,
station {
shortCode
}
}
}
}
In production it returns:
"trainsByDepartureDate": [
{
"trainNumber": 1,
"version": "287293186071",
"timeTableRows": null
},
In beta it returns:
"trainsByDepartureDate": [
{
"trainNumber": 1,
"version": "289234858811",
"timeTableRows": []
},
If you encounter any problems or get errors, please report them here.
Ystävällisin terveisin / Best regards
– Digitraffic asiakastuki / Digitraffic support –