QuestionQ20
Troubleshoot infrastructure and configuration issuesA single Adobe Commerce Cloud instance is configured with two websites, each containing one store view and using different domains.
- The default website is
website_one, with store viewstore_oneand domainstoreone.com. - The second website is
website_two, with store viewstore_twoand domainstoretwo.com.
The magento-vars.php file is configured as follows to determine which website each request runs against:

During testing of a new GraphQL integration, every request returned data for the default website, irrespective of the domain.
What is the cause of this issue?
- A The magento-vars.php file is not processed for any GraphQL requests, so the default website is always processed.
- B $_SERVER[“MAGE_RUN_CODE”] needs to be set to store and $_SERVER[“MAGE_RUN_TYPE”] needs to be set to the store code instead.
- C GraphQL requests are always run against the default store view unless a Store header or store cookie is provided.
Community Discussion