Upgrading GraphQL query validation to be more compliant
We recently introduced an upgraded GraphQL parser that enforced GraphQL specification query validations that were previously ignored. The API schema did not change.
This was done to provide a more reliable and consistent API experience while also simplifying integrations with other GraphQL-compliant tools.
This upgrade caused queries that previously passed validation in 2024-07
to fail in 2024-10
.
Solution
To avoid any breaking changes in version 2024-10
, we've made the new parser backward compatible. This means that you can request 2024-10
in the API-Version
header to continue using the query successfully.
From 2025-01
onwards, some validation rules will be introduced as breaking changes. You will then need to adjust your queries according to the documented schema. Queries that don't meet these standards may fail.
Impact
This fix impacts a variety of queries, including those that use a line break inside of a string or send null
in a non-nullable field. If you switch to 2024-10
and encounter any unannounced breaking changes, please open a support ticket to report it to the team.
Test your queries
If you want to test your query, we recommend using the API playground. Before running the query, if any of it is not valid, you should see a syntax error in red on the left side. In versions 2024-10
and earlier, the query will still run successfully despite the error.
Examples
Line breaks
For scenarios that do not involve line breaks directly within string values, 2024-10
and earlier would accept the input in the example below.
mutation {
change_multiple_column_values (
item_id: 2973338210,
board_id: 2973338169,
column_values: "{
\"link__1\":
{\"url\": \"www.example.com\",\"text\": \"link url\"}
}")
{ id }
}
Now, version 2025-01
will expect the string as a single line.
mutation {
change_multiple_column_values(
item_id: 9876543210,
board_id: 1234567890,
column_values: "{\"link__1\": {\"url\": \"https://www.example.com\", \"text\": \"link url\"}}"
) {
id
}
}
Null values
Versions 2024-10
and earlier sometimes accepted null values for non-nullable fields.
query {
boards (ids: 1234567890) {
items_page (limit: 1, query_params: {
rules: [
{column_id: "checkbox", compare_value: [null], operator: is_not_empty}
]
}) {
items {
id
name
}
}
}
}
Version 2025-01
will not accept null
, so you have to send an empty compare_value
.
query {
boards (ids: 1234567890) {
items_page (limit: 1, query_params: {
rules: [
{column_id: "checkbox", compare_value: [], operator: is_not_empty}
]
}) {
items {
id
name
}
}
}
}