You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually wp-graphql-polylang cannot work at all when called from PHP. That's because Polylang initializes itself into a specific mode which maybe be "admin", "frontend" or "rest" and now via wp-graphql-polylang "graphl" too. Once the intialization has been done it cannot changed anymore (at least to my knowledge).
So in wp-graphql-polylang I must tell it to go to the graphql mode as soon as possible. If it is too late Polylang will initialize into the frontend mode. This does happen before the init. The frontend mode would filter everything by the default language which is no good for a graphql api because you'll want to specify the language using the where-args so you can query posts in multiple languages if you want.
The text was updated successfully, but these errors were encountered:
esamattis
changed the title
Does not work when called from PHP
Does not work when called from PHP using do_graphql_request()Oct 21, 2020
See wp-graphql/wp-graphql#1021 (comment)
The text was updated successfully, but these errors were encountered: