thaiphan / graphy_routes
Extend the Drupal 8 GraphQL module to support querying by routes
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:drupal-module
Requires
- php: >=7.2
- drupal/graphql: 4.x-dev
This package is auto-updated.
Last update: 2024-10-29 05:59:35 UTC
README
This simple Drupal GraphQL V4 extension allows you to retrieve the URLs for all your nodes. You can filter by bundle. Very useful for projects that require static site generation!
Installation
You can install using Composer.
composer require thaiphan/graphy-routes
Usage
Use the following syntax to retrieve the URL for your nodes:
query { routes(bundles: ["article", "page"]) { total items { url } } }
You will get the following response:
{ "data": { "routes": { "total": 3, "items": [ { "url": "/node/1" }, { "url": "/contact-us" }, { "url": "/the-best-dabs-of-2020" } ] } } }