WordPress plugin · WPML family
WPML GraphQL Add-on
Add language filtering and translations to WPGraphQL queries for multilingual headless sites.
About This Plugin
The WPML GraphQL Add-on adds language awareness to the WPGraphQL schema, so you can build a multilingual headless site. It is built by the WPML team and is included with the Multilingual CMS and Agency plans.
Every WPGraphQL query gains a language argument. Filter posts, custom post types, taxonomy terms, menus, menu items and comments by language, or pass language: "all" to get everything. Connected categories, tags and custom taxonomies follow the language of the node you filter. The translations field on posts and terms returns every other-language version in one query, with slug, URI and language code. You can also fetch a single translated post by ID or slug in any language.
The languages and defaultLanguage queries list each installed language with code, locale, native name, flag URL and home URL, which is the data a custom language switcher needs. With ACFML and WPGraphQL for ACF, it adds a language argument to ACF Options Page queries.