https://github.com/zesty-io/gatsby-source-zesty
Gatsby plugin for the headless CMS Zesty.io
https://github.com/zesty-io/gatsby-source-zesty
gatsby gql nodejs
Last synced: 3 months ago
JSON representation
Gatsby plugin for the headless CMS Zesty.io
- Host: GitHub
- URL: https://github.com/zesty-io/gatsby-source-zesty
- Owner: zesty-io
- Created: 2019-05-01T16:41:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T13:23:59.000Z (over 3 years ago)
- Last Synced: 2025-10-08T08:32:08.292Z (10 months ago)
- Topics: gatsby, gql, nodejs
- Language: JavaScript
- Homepage: https://www.zesty.io
- Size: 422 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatsby Source Zesty
Source plugin to get Zesty.io data in Gatsby sites
## Installation
```bash
# Install the plugin
yarn add gatsby-source-zesty
```
in `gatsby-config.js`
```javascript
module.exports = {
plugins: [
{
resolve: 'gatsby-source-zesty',
options: {
url: `https://your-zesty-instance.com/-/gql/`,
},
},
...
],
};
```
## Configuration options
Your Zesty.io GraphQL endpoint URL is required.
To turn this on you can follow these steps:
- Log into Zesty.io
- Open the manager interface for the instance you want to access GraphQL
- In manager, Go to your Schema > settings area
- Navigate to Developer settings
- Click GraphQL to turn on
- Set GraphQL origin to \* (this can later be tied to your remote)
## How to query
All content of a certain type
```graphql
{
allCategory {
nodes {
category
description
}
}
}
```
Filtering
```graphql
{
allHomepage(filter: { data: { title: { eq: "the article I want" } } }) {
nodes {
data {
image
title
content
}
}
}
}
```
more information on [GraphQL querying](https://www.gatsbyjs.org/docs/graphql-reference/).