Skip to main content

Upcoming GraphQL Breaking Changes - Action Required

Feb. 7, 2023, 1:56 p.m.

What is changing?

Starting at 11 am (GMT) on March 8th, we will be deploying an upgrade to several of our libraries for our GraphQL API, as part of our continued efforts to improve the usability and security of our platform.

This will result in two changes to how queries are made for our endpoints.

  1. GraphQL will now enforce strict typing on query and mutation inputs. Prior to this change, some incorrect types would be accepted as valid inputs, which in some cases would lead to confusing failure cases. For example, passing in "false" into a BooleanField rather than false would result in the field resolving to true . Trying to do so after March 8th will result in a ValidationError instead. This change will affect all types, including int and string fields.
  2. Validation error messages resulting from type failures that are natively raised from GraphQL will be updated to be clearer. At present, errors are returned with the following format:
In field "field": Expected type "Date", found "13/08/2020"

After March 8th, the same error will have the format

Variable '$input' got invalid value '13/08/2020' at 'input.field'; 
Date cannot represent value: '13/08/2020'"

What do I need to do?

You should check places where you are passing variables to our API programmatically, and ensure that the types you are using match the expected type in the schema.

For example, if you were making the following query

query anExampleQuery($ID: Int!, $someValue: String!, $someBoolean: Boolean!) {
	exampleQuery(input: {
		ID: $ID,
		someValue: $someValue,
    someBoolean: $someBoolean,
	}) {
	  result  
  }
}

and passing the variables ID = "123" , someValue=123, and someBoolean=”true”, you would need to update these variables to ID = 123 , someValue="123", and someBoolean=true before March 8th.

You should also check to ensure that you don’t rely on specific wording for failure messages.

What should I do if I have questions?

If you have questions or concerns about the upcoming changes, please reach out to your product or project manager.