PHPackages                             taicait/ss-gatsby-fixed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. taicait/ss-gatsby-fixed

ActiveSilverstripe-vendormodule

taicait/ss-gatsby-fixed
=======================

SilverStripe Gatsby fixed

1.0(5y ago)023MITPHP

Since Jan 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/taicait/ss-gatsby-fixed)[ Packagist](https://packagist.org/packages/taicait/ss-gatsby-fixed)[ RSS](/packages/taicait-ss-gatsby-fixed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

SilverStripe Gatsby module
--------------------------

[](#silverstripe-gatsby-module)

This module provides a graphql API that is tailored to provide data to a [Gatsby](https://gatsbyjs.com) static build. This allows your SilverStripe CMS installation to become a headless data provider for your Gatsby static site generation.

Installation
------------

[](#installation)

```
$ composer require silverstripe/silverstripe-gatsby

```

Requirements
------------

[](#requirements)

Your Gatsby project must have the [gatsby-source-silverstripe](https://github.com/silverstripe/gatsby-source-silverstripe) plugin installed.

`$ npm install --save gatsby-source-silverstripe`

It is also recommended that you use the [silverstripe-gatsby-helpers](https://github.com/unclecheese/silverstripe-gatsby-helpers) library installed.

`$ npm install --save silverstripe-gatsby-helpers`

How to use the API
------------------

[](#how-to-use-the-api)

The API has its own endpoint, separate from the SilverStripe admin GraphQL server or any GraphQL you may be using on your frontend.

`http://mysite.com/__gatsby/graphql`

### Querying the data

[](#querying-the-data)

The query itself is a bit awkward, but in general, the only client accessing this API should be Gatsby itself, and therefore it doesn't have a huge obligation to be developer-friendly.

```
query Sync($Limit:Int!, $Token:String, $Since:String) {
  sync {
    results(limit: $Limit, offsetToken: $Token, since: $Since) {
      offsetToken # Use this on subsequent requests to chunk results
      nodes {
        id
        parentUUID
        uuid
        created
        lastEdited
        className
        ancestry
        contentFields # All custom fields are flattened into a JSON string
        link # DataObjects are encouraged to provide Link() methods if they appear as pages
        relations {
          type # HAS_ONE, HAS_MANY, etc
          name
          ownerType
          records {
            className
            id
            uuid
          }
        }
      }
    }
  }
}`

```

### Arguments

[](#arguments)

- **limit**: Limit the number of records that come back for each query. On a large site, this is critical. Default value: `1000`.
- **offsetToken**: If your previous request provided you with a `offsetToken`, pass it back in here to pick up where the previous result set left off.
- **since**: Essential for incremental/preview builds in Gatsby. Provide a timestamp as a reference to get only records that have changed since then.

Controlling what dataobjects are exposed
----------------------------------------

[](#controlling-what-dataobjects-are-exposed)

Obviously, you don't want to expose every single dataobject in the application. Internals like `LoginAttempt` and `ChangeSet` are not remotely useful to a Gatsby build, where content is the focus.

You can whitelist and blacklist classes, using wildcarding.

```
SilverStripe\Gatsby\GraphQL\Types\SyncResultTypeCreator:
  included_dataobjects:
    myapp: 'MyCompany\MyApp\*'
  excluded_dataobjects:
    security: 'SilverStripe\Security\*'
    versioned: 'SilverStripe\Versioned\*'
    shortcodes: 'SilverStripe\Assets\Shortcodes\*'
    siteTreeLink: 'SilverStripe\CMS\Model\SiteTreeLink'
```

If both a whitelist and blacklist are provided, the blacklist has the final say.

If no whitelist is provided, all dataobjects are in the query by default, until blacklisted.

If no whitelist and no blacklist are provided, don't do that.

Monolithic typing
-----------------

[](#monolithic-typing)

Due to the complex inheritance patterns in SilverStripe, creating a properly typed API using unions and interfaces would be a lot of effort and may actually make the developer experience worse in the end. For now, all types are `DataObject`, and the Gatsby source plugin is able to pseudo-type the `customFields` blob by namespacing each unserialised field in class-specific subfields.

```
query {
	allDataObjects {
		# core fields here
		id
		link
		lastEdited
		SilverStripeSiteTree {
			# fields specific to this class are grouped appropriately
			title
			menuTitle
			content
		}
		SilverStripeBlog {
			featuredImage {
				link
			}
			Children {
				link
				# relationships still have to nest their fields
				SilverStripeBlogPost {
					categories {
						title
					}
				}
			}
		}
	}
}

```

Token-based authentication (for draft content)
----------------------------------------------

[](#token-based-authentication-for-draft-content)

Coming soon.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1944d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef3eb725f96c6765a1ae74ccd856452775f821464b49149870844508b191e6e9?d=identicon)[taicait](/maintainers/taicait)

---

Top Contributors

[![UndigitalVN](https://avatars.githubusercontent.com/u/224498986?v=4)](https://github.com/UndigitalVN "UndigitalVN (5 commits)")

---

Tags

silverstripegatsby

### Embed Badge

![Health badge](/badges/taicait-ss-gatsby-fixed/health.svg)

```
[![Health](https://phpackages.com/badges/taicait-ss-gatsby-fixed/health.svg)](https://phpackages.com/packages/taicait-ss-gatsby-fixed)
```

###  Alternatives

[silvershop/core

Provides an ecommerce product catalog, shopping cart, and order management system

11340.0k42](/packages/silvershop-core)[silverstripe-terraformers/gridfield-rich-filter-header

Rich filter header component for GridField

1325.7k1](/packages/silverstripe-terraformers-gridfield-rich-filter-header)[sunnysideup/ecommerce

Silverstripe E-commerce Application

257.2k79](/packages/sunnysideup-ecommerce)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
