Skip to content
WPGraphQL Polylang Extension for WordPress
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Setup wp-graphql&polylang plugins May 1, 2019
bin Create database only if it does not exist May 10, 2019
src Fix create terms with default lang May 4, 2019
tests Better test env detection May 4, 2019
tools Add tools/update-autoload May 7, 2019
vendor Use composer to autoload classes May 7, 2019
.env.local Update local test config May 10, 2019
.env.travis Add travis env file May 1, 2019
.gitignore Use composer to autoload classes May 7, 2019
.prettierrc Add prettier-php Mar 10, 2019
.travis.yml typo... May 7, 2019
CHANGELOG.md Add changelog May 7, 2019
LICENSE Update LICENSE May 7, 2019
README.md Add Travis badge May 7, 2019
codeception.yml Fix default_lang notice May 2, 2019
composer.json Fix test runner May 7, 2019
composer.lock Setup wp-graphql&polylang plugins May 1, 2019
package-lock.json
package.json Fix prettier command May 3, 2019
phpcs.xml.dist Initial files from 'wp scaffold plugin-tests' May 1, 2019
phpunit.xml.dist Initial files from 'wp scaffold plugin-tests' May 1, 2019
wp-graphql-polylang.php Add notice about too old Polylang version May 8, 2019

README.md

WPGraphQL Polylang Extension

Build Status

Extend WPGraphQL schema with language data from the Polylang plugin.

Features

For posts and terms (custom ones too!)

  • Adds language and translations fields
  • Filter with a language where argument
  • Set the language on create and update mutations
  • Show all translations in the api by default
    • Polylang patches the WP Query to only list items with the current language. This plugin reverts that for the GraphQL api

Root queries

  • defaultLanguage get the current default language
  • languages list all configured languages

For details please refer to the generated docs in GraphiQL.

Requirements

  • PHP 7.2. We're planning to relax this a bit though
  • [WPGraphQL][] 0.3.x
  • Polylang from the github master
    • Stable releases will work once pll_context filter ships
    • The free version is enough

Slack

You can find us from the WPGraphQL Slack on the #polylang channel.

You can’t perform that action at this time.