This article provides recommendations on how to solve the issue where Venia storefront GraphQL queries to Magento instance produce validation errors.
Affected products and versions
- Magento Commerce 2.2.x, 2.3.x
- Magento Commerce Cloud 2.2.x, 2.3.x
- Magento PWA Studio project
Venia GraphQL queries to Magento Commerce or Magento Commerce Cloud produce validation errors.
One of the reasons causing the problem, might be Venia and its GraphQL queries being out of sync with the schema of the connected Magento instance.
To test whether your queries are up to date, run the following command in the project root:
yarn run validate-queries
This will show a compatibility report. If you have incompatibilities, you need to upgrade your PWA Studio or Magento instance. Check the Magento compatibility matrix to see what exactly versions you need.
Reference the following documentation for instructions on how to upgrade:
- For PWA Studio upgrades, search for the "Upgrading from a previous version" section of the PWA release notes for the version that you need to upgrade to.
- Upgrade Magento Commerce Cloud version
- Upgrade Magento Commerce (installed using "composer create-project" or archive)
- Upgrade Magento Commerce (installed by cloning Magento repo)