https://github.com/thaiphan/graphy-routes
Extend the Drupal 8 GraphQL module to support querying by routes
https://github.com/thaiphan/graphy-routes
drupal drupal-8 drupal-module graphql
Last synced: about 2 months ago
JSON representation
Extend the Drupal 8 GraphQL module to support querying by routes
- Host: GitHub
- URL: https://github.com/thaiphan/graphy-routes
- Owner: thaiphan
- License: mit
- Created: 2020-05-23T12:07:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T13:29:19.000Z (about 6 years ago)
- Last Synced: 2025-03-11T22:44:57.204Z (over 1 year ago)
- Topics: drupal, drupal-8, drupal-module, graphql
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphy Routes
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.
```sh
composer require thaiphan/graphy-routes
```
## Usage
Use the following syntax to retrieve the URL for your nodes:
```graphql
query {
routes(bundles: ["article", "page"]) {
total
items {
url
}
}
}
```
You will get the following response:
```json
{
"data": {
"routes": {
"total": 3,
"items": [
{
"url": "/node/1"
},
{
"url": "/contact-us"
},
{
"url": "/the-best-dabs-of-2020"
}
]
}
}
}
```