WPGraphQL Polylang Extension for WordPress

Overview

WPGraphQL Polylang Extension

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 default language. This plugin reverts that for the GraphQL api
  • ACF Options Pages support

Root queries

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

Menu

  • Filter menu items by language

For details please refer to the generated docs in GraphiQL.

Example

Example showing all features

query PolylangExample {
    # Filter pages by language. If not set it defaults to ALL
    pages(where: { language: EN }) {
        nodes {
            title

            # Get language of each page
            language {
                code # Language code
                name # Human readable name of the language
            }

            # Get links to the translates versions of each page
            # This is an array of post objects
            translations {
                title
                link
                language {
                    code
                }
            }
        }
    }

    # Taxonomies such as tags can be filtered like post objects
    tags(where: { language: EN }) {
        nodes {
            name
            language {
                code
                name
            }
        }
    }

    # Get translated version of a given menu
    menuItems(where: { language: EN, location: FOOTER_MENU }) {
        nodes {
            url
        }
    }

    # Get the default language
    defaultLanguage {
        name
        code
    }

    # Get all configured languages
    languages {
        name
        code
    }

    # Get translations for ACF Options Pages.
    # See the section in the README.
    siteSettings(language: EN) {
        siteSettings {
            footerTitle
        }
    }
}

Requirements

  • PHP 7.2 or later
  • WPGraphQL 0.13.x or later
  • Polylang 2.6.5 or later
    • The free version is enough
    • If you get the PRO version the pro features such as translated slugs will work too

Installation

If you use composer you can install it from Packagist

composer require valu/wp-graphql-polylang

Otherwise you can clone it from Github to your plugins using the stable branch

cd wp-content/plugins
git clone --branch stable https://github.com/valu-digital/wp-graphql-polylang.git

ACF Options Pages

In addition to WPGraphQL and Polylang plugins you'll need these plugins too

You can install the free plugins using Composer. You'll need to have the WordPress Packagist repository enabled.

composer require wp-graphql/wp-graphql-acf wpackagist-plugin/acf-options-for-polylang

When registering the Options Page you must pass in show_in_graphql and graphql_field_name arguments.

acf_add_options_page([
    'page_title' => __('Site settings', 'theme'),
    'menu_title' => __('Site settings', 'theme'),
    'menu_slug' => 'site-settings',
    'capability' => 'manage_options',
    'redirect' => false,
    'show_in_graphql' => true,
    'graphql_field_name' => 'siteSettings'
]);

Slack

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

WPML

But I'm using WPML?!

There's rburgst/wp-graphql-wpml.

Or you might want to checkout migration docs

https://polylang.pro/how-to-switch-from-wpml-to-polylang/

Contributing

Checkout CONTRIBUTING.md

Comments
  • Get queried/resolved language for a given post

    Get queried/resolved language for a given post

    I am trying to register a GraphQL field (https://www.wpgraphql.com/2020/03/11/registering-graphql-fields-with-arguments/), and inside the resolve callback, I need to do a WP query, and for that I’d like to query posts in specific language. How can I get the current language? Unfortunately pll_current_language() returns false.

    You specifically say that you have deactivated the "native" way Polylang fetches posts when using WP_Query, but actually, in my case I'd prefer if it only queried in the language that was resolved.

    I query by URI like this:

    query Posts {
      post(id: "/en/unlimited", idType: URI) {
    

    Although not very pretty, I came up with this workaround that gives me the language of the queried object:

    /**
     * For lack of a better way to get the currently queried language inside GraphQL
     * @return mixed
     */
    function get_queried_language() {
        $lang = pll_get_post_language($GLOBALS['wp_the_query']->queried_object->ID);
        return ($lang) ? $lang : pll_default_language();
    }
    

    A better solution would be if pll_current_language could be used inside resolve of register_graphql_field

    opened by simplenotezy 9
  • Neither `menu` nor `menuItem` has field

    Neither `menu` nor `menuItem` has field "language"

    Neither menu nor menuItem has field "language"

    Screenshots

    image image

    WordPress v5.5.1 Polylang v2.8.2 WP GraphQL Polylang v0.5.0 WP GraphQL v0.13.1 WP GraphiQL v1.0.1

    opened by SilencerWeb 8
  • When you query for a single post via URI, then the language is ignored

    When you query for a single post via URI, then the language is ignored

    When you query for a single post via URI, then the language parameter in the URL is ignored. Query returns only the post in the standard language:

    query MyQuery {
      teamMember(id: "/fr/team_members/lorem-ipsum/", idType: URI) {
        slug
        language {
          code
        }
        uri
      }
    }
    

    It should return the the French version for the query above.

    duplicate 
    opened by MobyDigg 6
  • Menu-Language not working

    Menu-Language not working

    Hi there, First of all, wp-graphql-polylang is awesome!

    I found an issue when using it with WPGraphql Version 0.12.3 where menu-languages are not working anymore.

    I figured out, that the filter graphql_menu_item_connection_args you're using has been removed and is not applied anymore.

    Maybe there is another way, but I couldn't find one.

    Thanks in advance, David

    opened by davidfaber 5
  • Retrieving category translation generating error

    Retrieving category translation generating error

    Hello, im trying to retrieve translations on category and it's giving me the following internal error, there are no PHP error log for this error to debug further. There exists a valid translated category im passing the ID for.

    Graphql: query MyQuery { category(idType: DATABASE_ID, id: 2) { name translations { id } } }

    Error:{ "errors": [ { "message": "Internal server error", "category": "internal", "locations": [ { "line": 5, "column": 7 } ], "path": [ "category", "translations", 0, "id" ] } ], "data": { "category": { "name": "xyz", "translations": [ null ] } } }

    opened by daniyals14 5
  • Introducing language specific isFrontPage

    Introducing language specific isFrontPage

    My suggestion is to introduce some identifier for the frontpage of each language.

    This would help to identify the Homepage of each language on the StaticSiteGeneration-Side, so one can adjust the paths to be /, /en/, /de/ without the title like/en/home`.

    Example Query could be:

    query MyQuery {
      pages(where: {parent: null}, first: 100) {
        nodes {
          title
          uri
          language {
            isFrontPage
          }
        }
      }
    }
    

    @epeli suggested to do something like this in the core wp-graphql:

    return apply_filters( 'graphql_post_is_front_page', $post->ID === get_option('page_on_front'), $post);
    

    And wp-graphql-polylang could extend that by returning true for all translated front pages too.

    opened by henrikwirth 4
  • IsFrontPage and isPostsPage

    IsFrontPage and isPostsPage

    Hi,

    While working on a recent project I realised that both this fields don't return the values I would expect for translated posts. I've ended up overriding the original resolvers to achieve this. Let me know if you see fit and I'd be happy to open a PR.

    add_filter( 'graphql_Page_fields', function( $fields ) {
      if ( isset( $fields['isFrontPage'] ) ) {
        $fields['isFrontPage']['resolve'] = function(\WPGraphQL\Model\Post $post) {
          if ( 'page' !== $post->post_type || 'page' !== get_option( 'show_on_front' ) ) {
            return false;
          }
    
          $post_translations = array_values(pll_get_post_translations($post->ID));
          $front_page_id     = absint( get_option( 'page_on_front', 0 ) );
    
          return in_array($front_page_id, $post_translations);
        };
      }
    
      if ( isset( $fields['isPostsPage'] ) ) {
        $fields['isPostsPage']['resolve'] = function(\WPGraphQL\Model\Post $post) {
          if ( 'page' !== $post->post_type ) {
            return false;
          }
    
          $post_translations = array_values(pll_get_post_translations($post->ID));
          $page_for_posts_id = absint( get_option( 'page_for_posts', 0 ) );
    
          return 'posts' !== get_option( 'show_on_front', 'posts' ) && in_array($page_for_posts_id, $post_translations) === true;
        };
      }
      return $fields;
    }, 10, 1 );
    
    opened by luisbraga 3
  • The plugin does not show

    The plugin does not show "language" for WooCommerce products

    I am using wp-graphql-polylang and wp-graphql-woocommerce, but when querying products I cannot find the "language" schema. I now used a work around through an ACF select field, but it would be nice to have languages available for WooCommerce products 👍

    opened by MobyDigg 3
  • Does nodeByUri + graphql-polylang support getting the frontpage in several languages?

    Does nodeByUri + graphql-polylang support getting the frontpage in several languages?

    @esamattis terve from Estonia!

    I was wondering if nodeByUri + graphql-polylang should be able to retrieve the frontpage for each language if only given a language slug such as /fi or /de ?

    I'm currently using PolyLang and PolyLang GraphQL but I'm only able to retrieve the default language and the frontpages in other languages result in null.)

    I first asked the wp-graphql team (https://github.com/wp-graphql/wp-graphql/issues/2249) but they are no sure either so probably it's more appropriate to ask here.

    Thanks Kris

    opened by krishaamer 2
  • Bump guzzlehttp/guzzle from 7.3.0 to 7.4.4

    Bump guzzlehttp/guzzle from 7.3.0 to 7.4.4

    Bumps guzzlehttp/guzzle from 7.3.0 to 7.4.4.

    Release notes

    Sourced from guzzlehttp/guzzle's releases.

    Release 7.4.4

    See change log for changes.

    Release 7.4.3

    See change log for changes.

    Release 7.4.2

    See change log for changes.

    Release 7.4.1

    See change log for changes.

    Release 7.4.0

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/guzzle's changelog.

    7.4.4 - 2022-06-09

    • Fix failure to strip Authorization header on HTTP downgrade
    • Fix failure to strip the Cookie header on change in host or HTTP downgrade

    7.4.3 - 2022-05-25

    • Fix cross-domain cookie leakage

    7.4.2 - 2022-03-20

    Fixed

    • Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
    • Reject non-HTTP schemes in StreamHandler
    • Set a default ssl.peer_name context in StreamHandler to allow force_ip_resolve

    7.4.1 - 2021-12-06

    Changed

    • Replaced implicit URI to string coercion #2946
    • Allow symfony/deprecation-contracts version 3 #2961

    Fixed

    • Only close curl handle if it's done #2950

    7.4.0 - 2021-10-18

    Added

    Fixed

    • Make sure we always call restore_error_handler() #2915
    • Fix progress parameter type compatibility between the cURL and stream handlers #2936
    • Throw InvalidArgumentException when an incorrect headers array is provided #2916, #2942

    Changed

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump guzzlehttp/guzzle from 7.3.0 to 7.4.3

    Bump guzzlehttp/guzzle from 7.3.0 to 7.4.3

    Bumps guzzlehttp/guzzle from 7.3.0 to 7.4.3.

    Release notes

    Sourced from guzzlehttp/guzzle's releases.

    Release 7.4.3

    See change log for changes.

    Release 7.4.2

    See change log for changes.

    Release 7.4.1

    See change log for changes.

    Release 7.4.0

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/guzzle's changelog.

    7.4.3 - 2022-05-25

    • Fix cross-domain cookie leakage

    7.4.2 - 2022-03-20

    Fixed

    • Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
    • Reject non-HTTP schemes in StreamHandler
    • Set a default ssl.peer_name context in StreamHandler to allow force_ip_resolve

    7.4.1 - 2021-12-06

    Changed

    • Replaced implicit URI to string coercion #2946
    • Allow symfony/deprecation-contracts version 3 #2961

    Fixed

    • Only close curl handle if it's done #2950

    7.4.0 - 2021-10-18

    Added

    Fixed

    • Make sure we always call restore_error_handler() #2915
    • Fix progress parameter type compatibility between the cURL and stream handlers #2936
    • Throw InvalidArgumentException when an incorrect headers array is provided #2916, #2942

    Changed

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • When using language codes/slugs like 'nl-nl' the graphql return an enum error

    When using language codes/slugs like 'nl-nl' the graphql return an enum error

    Some websites need a double language code/slug. nl-nl nl-en be-nl be-fr be-en

    The graphql does not open when a language is configured this way. it gives this php error en remains loading endlesly

    Names must only contain [_a-zA-Z0-9] but "NL-NL" does not.

    easy replicable by simply changing the code name of a language

    It looks like a minor validation issue, but i can't trace it in the php

    opened by mauritsweebers 1
  • str_replace lang codes from - to _

    str_replace lang codes from - to _

    Replaced - with _ in language codes

    resolves error where language codes are hyphenated Missing onError handler for invocation 'extracting-queries', error was 'Error: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "PT-BR" does not.'.

    opened by philJohnson 0
  • Bump guzzlehttp/guzzle from 7.3.0 to 7.4.5

    Bump guzzlehttp/guzzle from 7.3.0 to 7.4.5

    Bumps guzzlehttp/guzzle from 7.3.0 to 7.4.5.

    Release notes

    Sourced from guzzlehttp/guzzle's releases.

    Release 7.4.5

    See change log for changes.

    Release 7.4.4

    See change log for changes.

    Release 7.4.3

    See change log for changes.

    Release 7.4.2

    See change log for changes.

    Release 7.4.1

    See change log for changes.

    Release 7.4.0

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/guzzle's changelog.

    7.4.5 - 2022-06-20

    • Fix change in port should be considered a change in origin
    • Fix CURLOPT_HTTPAUTH option not cleared on change of origin

    7.4.4 - 2022-06-09

    • Fix failure to strip Authorization header on HTTP downgrade
    • Fix failure to strip the Cookie header on change in host or HTTP downgrade

    7.4.3 - 2022-05-25

    • Fix cross-domain cookie leakage

    7.4.2 - 2022-03-20

    Fixed

    • Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
    • Reject non-HTTP schemes in StreamHandler
    • Set a default ssl.peer_name context in StreamHandler to allow force_ip_resolve

    7.4.1 - 2021-12-06

    Changed

    • Replaced implicit URI to string coercion #2946
    • Allow symfony/deprecation-contracts version 3 #2961

    Fixed

    • Only close curl handle if it's done #2950

    7.4.0 - 2021-10-18

    Added

    Fixed

    • Make sure we always call restore_error_handler() #2915
    • Fix progress parameter type compatibility between the cURL and stream handlers #2936
    • Throw InvalidArgumentException when an incorrect headers array is provided #2916, #2942

    Changed

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump composer/composer from 2.1.8 to 2.2.12

    Bump composer/composer from 2.1.8 to 2.2.12

    Bumps composer/composer from 2.1.8 to 2.2.12.

    Release notes

    Sourced from composer/composer's releases.

    2.2.12

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)
    • Fixed curl downloader not retrying when a DNS resolution failure occurs (#10716)
    • Fixed composer.lock file still being used/read when the lock config option is disabled (#10726)
    • Fixed validate command checking the lock file even if the lock option is disabled (#10723)

    2.2.11

    • Added missing config.bitbucket-oauth in composer-schema.json
    • Added --2.2 flag to self-update to pin the Composer version to the 2.2 LTS range (#10682)
    • Updated semver, jsonlint deps for minor fixes
    • Fixed generation of autoload crashing if a package has a broken path (#10688)
    • Removed dev-master=>dev-main alias from #10372 as it does not work when reloading from lock file and extracting dev deps (#10651)

    2.2.10

    • Fixed Bitbucket authorization detection due to API changes (#10657)
    • Fixed validate command warning about dist/source keys if defined (#10655)
    • Fixed deletion/handling of corrupted 0-bytes zip archives (#10666)

    2.2.9

    • Fixed regression with plugins that modify install path of packages, see docs if you are authoring such a plugin (#10621)

    2.2.8

    • Fixed files autoloading sort order to be fully deterministic (#10617)
    • Fixed pool optimization pass edge cases (#10579)
    • Fixed require command failing when self.version is used as constraint (#10593)
    • Fixed --no-ansi / undecorated output still showing color in repo warnings (#10601)
    • Performance improvement in pool optimization step (composer/semver#131)

    2.2.7

    • Allow installation together with composer/xdebug-handler ^3 (#10528)
    • Fixed support for packages with no licenses in licenses command output (#10537)
    • Fixed handling of allow-plugins: false which kept warning (#10530)
    • Fixed enum parsing in classmap generation when the enum keyword is not lowercased (#10521)
    • Fixed author parsing in init command requiring an email whereas the schema allows a name only (#10538)
    • Fixed issues in require command when requiring packages which do not exist (but are provided by something else you require) (#10541)
    • Performance improvement in pool optimization step (#10546)

    2.2.6

    • BC Break: due to an oversight, the COMPOSER_BIN_DIR env var for binaries added in Composer 2.2.2 had to be renamed to COMPOSER_RUNTIME_BIN_DIR (#10512)
    • Fixed enum parsing in classmap generation with syntax like enum foo:string without space after : (#10498)
    • Fixed package search not urlencoding the input (#10500)
    • Fixed reinstall command not firing pre-install-cmd/post-install-cmd events (#10514)
    • Fixed edge case in path repositories where a symlink: true option would be ignored on old Windows and old PHP combos (#10482)
    • Fixed test suite compatibility with latest symfony/console releases (#10499)
    • Fixed some error reporting edge cases (#10484, #10451, #10493)

    2.2.5

    • Disabled composer/package-versions-deprecated by default as it can function using Composer\InstalledVersions at runtime (#10458)
    • Fixed artifact repositories crashing if a phar file was present in the directory (#10406)
    • Fixed binary proxy issue on PHP <8 when fseek is used on the proxied binary path (#10468)

    ... (truncated)

    Changelog

    Sourced from composer/composer's changelog.

    [2.2.12] 2022-04-13

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)
    • Fixed curl downloader not retrying when a DNS resolution failure occurs (#10716)
    • Fixed composer.lock file still being used/read when the lock config option is disabled (#10726)
    • Fixed validate command checking the lock file even if the lock option is disabled (#10723)

    [2.2.11] 2022-04-01

    • Added missing config.bitbucket-oauth in composer-schema.json
    • Added --2.2 flag to self-update to pin the Composer version to the 2.2 LTS range (#10682)
    • Updated semver, jsonlint deps for minor fixes
    • Fixed generation of autoload crashing if a package has a broken path (#10688)
    • Removed dev-master=>dev-main alias from #10372 as it does not work when reloading from lock file and extracting dev deps (#10651)

    [2.2.10] 2022-03-29

    • Fixed Bitbucket authorization detection due to API changes (#10657)
    • Fixed validate command warning about dist/source keys if defined (#10655)
    • Fixed deletion/handling of corrupted 0-bytes zip archives (#10666)

    [2.2.9] 2022-03-15

    • Fixed regression with plugins that modify install path of packages, see docs if you are authoring such a plugin (#10621)

    [2.2.8] 2022-03-15

    • Fixed files autoloading sort order to be fully deterministic (#10617)
    • Fixed pool optimization pass edge cases (#10579)
    • Fixed require command failing when self.version is used as constraint (#10593)
    • Fixed --no-ansi / undecorated output still showing color in repo warnings (#10601)
    • Performance improvement in pool optimization step (composer/semver#131)

    [2.2.7] 2022-02-25

    • Allow installation together with composer/xdebug-handler ^3 (#10528)
    • Fixed support for packages with no licenses in licenses command output (#10537)
    • Fixed handling of allow-plugins: false which kept warning (#10530)
    • Fixed enum parsing in classmap generation when the enum keyword is not lowercased (#10521)
    • Fixed author parsing in init command requiring an email whereas the schema allows a name only (#10538)
    • Fixed issues in require command when requiring packages which do not exist (but are provided by something else you require) (#10541)
    • Performance improvement in pool optimization step (#10546)

    [2.2.6] 2022-02-04

    • BC Break: due to an oversight, the COMPOSER_BIN_DIR env var for binaries added in Composer 2.2.2 had to be renamed to COMPOSER_RUNTIME_BIN_DIR (#10512)
    • Fixed enum parsing in classmap generation with syntax like enum foo:string without space after : (#10498)
    • Fixed package search not urlencoding the input (#10500)
    • Fixed reinstall command not firing pre-install-cmd/post-install-cmd events (#10514)
    • Fixed edge case in path repositories where a symlink: true option would be ignored on old Windows and old PHP combos (#10482)

    ... (truncated)

    Commits
    • ba61e76 Release 2.2.12
    • a1f9baa Fix 5.3/5.4 builds
    • 2ba8758 Update changelog
    • 2c40c53 Merge pull request from GHSA-x7cr-6qr6-2hh6
    • 915b97f Fix docs
    • d64e32c Merge remote-tracking branch 'ktomk/patch-validate-no-check-lock' into 2.2
    • 0a8dfe6 Clarify that autoloader-suffix should be a non-empty-string, fixes #10720 (#1...
    • bb0edce Fixed lock file being used when lock:false is in config, refs #10715 (#10726)
    • 939c998 validate lock-file if configured (#10715, --check-lock)
    • 9bfd059 Fix curl downloader to retry in case of DNS resolution failure, fixes #10716
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump guzzlehttp/psr7 from 2.0.0 to 2.2.1

    Bump guzzlehttp/psr7 from 2.0.0 to 2.2.1

    Bumps guzzlehttp/psr7 from 2.0.0 to 2.2.1.

    Release notes

    Sourced from guzzlehttp/psr7's releases.

    2.2.1

    See change log for changes.

    2.2.0

    See change log for changes.

    2.1.2

    See change log for changes.

    2.1.1

    See change log for changes.

    2.1.0

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/psr7's changelog.

    2.2.1 - 2022-03-20

    Fixed

    • Correct header value validation

    2.2.0 - 2022-03-20

    Added

    • A more compressive list of mime types
    • Add JsonSerializable to Uri
    • Missing return types

    Fixed

    • Bug MultipartStream no uri metadata
    • Bug MultipartStream with filename for data:// streams
    • Fixed new line handling in MultipartStream
    • Reduced RAM usage when copying streams
    • Updated parsing in Header::normalize()

    2.1.1 - 2022-03-20

    Fixed

    • Validate header values properly

    2.1.0 - 2021-10-06

    Changed

    • Attempting to create a Uri object from a malformed URI will no longer throw a generic InvalidArgumentException, but rather a MalformedUriException, which inherits from the former for backwards compatibility. Callers relying on the exception being thrown to detect invalid URIs should catch the new exception.

    Fixed

    • Return null in caching stream size if remote size is null
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • fix: set post language before taxomoy values

    fix: set post language before taxomoy values

    This changes when the Custom post type language is set to before the taxonomies are updated in any create or update mutation with graphql

    The reason for this was that I was experiencing an issue setting taxonomies on a Custom post type create mutation when setting a language and using the correctly matched language terms values

    opened by natac13 0
Releases(v0.6.0)
  • v0.6.0(Sep 28, 2021)

    • Ensure support with wp-graphql v1.x and Polylang 3.x #59
      • Now running tests against wp-graphql 1.6.5 and Polylang 3.1.1 (latest versions at the time of writing).
    • Fix crash when a translated page was a draft on anonymous queries #60 @esamattis
    • Add ability filter by multiple languages with languages where arg #50 Thanks @simptheshrimp
    • Add homeUrl field to Language type #55 Thanks @philJohnson
    • isFrontPage now returns true for translated frontpages too #48 Thanks @tpaananen79
    • Fix typo causing default language code enum to be registered even if code is already found #53 Thanks @huesy

    All changes https://github.com/valu-digital/wp-graphql-polylang/compare/v0.5.0...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Oct 1, 2020)

    • Fixed menuItems with the latest WP GraphQL #28 #29 thanks @davidfaber !
    • Added support for preview posts #30 thanks @vilpersson !
    • Tested now with Polylang 2.8 and WP GraphQL 0.13

    Full changelog https://github.com/valu-digital/wp-graphql-polylang/compare/v0.4.0...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Apr 17, 2020)

    Breaking Changes

    WPGraphQL v0.6.0 or later is now required due to usage of is_graphql_http_request().

    Other Changes

    • Add support for ACF Options Pages
      • https://github.com/valu-digital/wp-graphql-polylang#acf-options-pages
    • Update to play nice with WPGraphQL v0.8.2 #23 thanks @jasonbahl
    • Fix empty LanguageCodeEnum #20 thanks @jasonbahl
    • Faster db seeding in tests a90c305
    • Update php prettier
    • Test setup fixes 84a14ce
    • use is_graphql_http_request ba16a1b

    All Changes

    https://github.com/valu-digital/wp-graphql-polylang/compare/v0.3.9...v0.4.0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.9(Mar 6, 2020)

    • Fix issue with the Admin Language switcher b585453
    • Run tests with wp-graphql 0.7 4dddc21
    • Use _filter naming and run prettier 16498a9
    • Use php5 trailing commas f4623e3
    • Upgrade prettier c7557aa

    All changes https://github.com/valu-digital/wp-graphql-polylang/compare/v0.3.8...v0.3.9

    Source code(tar.gz)
    Source code(zip)
  • v0.3.8(Feb 11, 2020)

    • Ensure terms translations can be fetched with IDs 3abf304

    All changes https://github.com/valu-digital/wp-graphql-polylang/compare/v0.3.8...v0.3.7

    Source code(tar.gz)
    Source code(zip)
  • v0.3.7(Jan 27, 2020)

  • v0.3.6(Jan 27, 2020)

    • Add language where arg support to contentNodes root query introduced by WPGraphQL 0.6.
    • Run tests against WPGraphQL 0.6

    All changes https://github.com/valu-digital/wp-graphql-polylang/compare/v0.3.5...v0.3.6

    Source code(tar.gz)
    Source code(zip)
  • v0.3.5(Dec 16, 2019)

  • v0.3.4(Dec 16, 2019)

    • Restore vendor with autoload dump
    • Update is_graphql_request to match with upstream one 3b1d4f1
    • Clean vendor before release da99360
    • Restore autoload 081efd7
    • Do not ignore vendor aee6504

    All changes https://github.com/valu-digital/wp-graphql-polylang/compare/v0.3.4...v0.3.3

    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Dec 11, 2019)

  • v0.3.2(Nov 6, 2019)

  • v0.3.1(Nov 6, 2019)

  • v0.3.0(Nov 6, 2019)

    Breaking changes

    If you used composer to install the package name has changed from valu-digital/wp-graphql-polylang to valu/wp-graphql-polylang to match our Packagist org.

    Other changes

    • Document installation
    • Publish to Packagist
    • Fix graphql request detection for sub url installations
    • Add contributing docs
    • Fix tests with wp-graphql v0.4.x
    • Use bundled composer autoloader only when not using global one
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Nov 6, 2019)

  • v0.2.1(May 7, 2019)

    • Fix init for wp-graphiql ed6652c
    • Die with error message when using too old Polylang version 83907ec

    All changes: https://github.com/valu-digital/wp-graphql-polylang/compare/v0.2.1...v0.2.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(May 7, 2019)

An WPGraphQL extension that adds SearchWP's query functionality to the GraphQL server

QL Search What is QL Search? An extension that integrates SearchWP into WPGraphQL. Quick Install Install & activate SearchWP v3.1.9+ Install & activat

Funkhaus 11 May 5, 2022
This is an extension to the WPGraphQL plugin for Yoast SEO

WPGraphQl Yoast SEO Plugin Please note version 14 of the Yoast Plugin is a major update. If you are stuck on version of Yoast before V14 then use v3 o

Ashley Hitchcock 197 Dec 26, 2022
a wordpress plugin that improves wpgraphql usage together with wpml

WPGraphQL WPML Extension Contributors: rburgst Stable tag: 1.0.6 Tested up to: 5.6.1 Requires at least: 4.9 Requires PHP: 7.0 Requires WPGraphQL: 0.8.

null 42 Dec 15, 2022
Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.

WpGraphQLCrb A Wordpress wrapper to expose Carbon Fields to WpGraphQL queries. Important This is just the first version. There is a lot of work to be

Matheus Paiva 16 Aug 19, 2022
Authentication for WPGraphQL using JWT (JSON Web Tokens)

WPGraphQL JWT Authentication This plugin extends the WPGraphQL plugin to provide authentication using JWT (JSON Web Tokens) JSON Web Tokens are an ope

WPGraphQL 268 Dec 31, 2022
Enable query locking for WPGraphQL by implementing persisted GraphQL queries.

?? WP GraphQL Lock This plugin enables query locking for WPGraphQL by implementing persisted GraphQL queries. Persisted GraphQL queries allow a GraphQ

Valu Digital 21 Oct 9, 2022
[ALPHA] Implementation of persisted queries for WPGraphQL

WPGraphQL Persisted Queries Persisted GraphQL queries allow a GraphQL client to optimistically send a hash of the query instead of the full query; if

Quartz 18 Jun 20, 2022
Send emails via mutation using WpGraphQl

WPGraphQL Send Email Plugin One of the simple things about a traditional WordPress sites is sending emails, this plugin makes it easy to do this via a

Ashley Hitchcock 18 Aug 21, 2022
Structured content blocks for WPGraphQL

WPGraphQL Content Blocks (Structured Content) This WPGraphQL plugin returns a WordPress post’s content as a shallow tree of blocks and allows for some

Quartz 72 Oct 3, 2022
WPGraphQL for Advanced Custom Fields

WPGraphQL for Advanced Custom Fields WPGraphQL for Advanced Custom Fields automatically exposes your ACF fields to the WPGraphQL Schema. Install and A

WPGraphQL 558 Jan 8, 2023
Adds Settings to the Custom Post Type UI plugin to show Post Types in WPGraphQL

DEPRECATION NOTICE ?? Custom Post Type UI v1.9.0 introduced formal support for WPGraphQL!!! ?? With that, this plugin is being deprecated and will no

WPGraphQL 77 Aug 3, 2022
WPGraphQL FacetWP integration plguin

WPGraphQL-FacetWP: WPGraphQL provider for FacetWP Quick Install Download and install like any WordPress plugin. Documentation The WPGraphQL documentat

null 31 Dec 11, 2022
WPGraphQL for Meta Box

WPGraphQL-MetaBox: WPGraphQL provider for Meta Box Quick Install Download and install like any WordPress plugin. Documentation The WPGraphQL documenta

null 25 Aug 8, 2022
Add WooCommerce support and functionality to your WPGraphQL server

WPGraphQL WooCommerce (WooGraphQL) Docs • AxisTaylor • Join Slack Quick Install Install & activate WooCommerce Install & activate WPGraphQL Download t

WPGraphQL 546 Jan 2, 2023
A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

WP Bootstrap 3.3k Jan 5, 2023
A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities.

Awesome WordPress A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities. Inspired by bayand

Dropndot Limited 91 Dec 26, 2022
The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone.

Pronamic WordPress Basecone The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone. Table of contents Au

Pronamic 1 Oct 19, 2021
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.

Suspend WP A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings. ?? Demo (coming so

Waren Gonzaga 3 Nov 15, 2021
Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.

Twenty Twenty-Two Welcome to the development repository for the default theme that will launch with WordPress 5.9. About Twenty Twenty-Two is designed

null 414 Nov 28, 2022