thaiphan/graphql_languages

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Extend the Drupal 8 GraphQL module to support querying languages

v1.0.0 2020-06-01 14:18 UTC

This package is auto-updated.

Last update: 2021-11-29 03:13:59 UTC


README

This simple Drupal GraphQL V4 extension adds some additional querying options for languages.

Installation

You can install using Composer.

composer require thaiphan/graphql_languages

Usage

Use the following syntax to retrieve your languages.

query {
  languages {
    id
    name
    direction
  }
}

You will get the following response:

{
  "data": {
    "languages": [
      {
        "id": "en",
        "name": "English",
        "direction": "ltr"
      },
      {
        "id": "it",
        "name": "Italian",
        "direction": "ltr"
      }
    ]
  }
}