I've been trying this out on my own local setup to test headless WordPress, and I found something similar, where the workaround provided in the other ticket didn't work for requests from the headless site, even though it appeared to work with the GraphQL IDE in the WordPress back end.
I tried a few alternatives and came up with this, which worked on my site, could you please check the same?
The intention is the same: if a GraphQL request passes the post slug then the WPML filters that normally handle returning posts in different languages are disabled.
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.