3.1.0 • Published 5 years ago

gatsby-source-kentico-cloud v3.1.0

Weekly downloads
120
License
MIT
Repository
github
Last release
5 years ago

Gatsby source plugin for Kentico Cloud

Build Status Forums

This repo contains the source plugin that gets data off of Kentico Cloud Delivery API.

How to run the code

You can use the plugin in any of the following ways:

Features

The plugin creates GraphQL nodes of all Kentico Cloud content types, content items and their language variants.

Names of nodes are prefixed with KenticoCloud. More specifically, the content type nodes are prefixed with KenticoCloudType, whereas the content items and their language variants have the KenticoCloudItem prefix.

The plugin creates the below relationships among all Kentico Cloud nodes. You can test them in the GraphiQL environment of your Gatsby app.

Content item <-> content type relationships

The relationship is captured in the contentItems navigation property of all content type nodes. In all content item nodes, it can be found in the contentType navigation property.

You can use the GraphiQL interface to experiment with the data structures produced by the source plugin. For instance, you can fetch content items of type kenticoCloudItemProjectReference and use the contentType navigation property to get the full list of elements of the underlying content type. Like so:

{
  allKenticoCloudItemProjectReference {
    edges {
      node {
        name___teaser_image__name {
          value
        }
        contentType {
          elements {
            codename
          }
        }
      }
    }
  }
}

Language variants relationships

This relationship is captured by otherLanguages navigation property of all content item nodes. For instance, you can get names of content items of type kenticoCloudItemSpeakingEngagement in their default language as well as in other languages. All in one go:

{
  allKenticoCloudItemSpeakingEngagement {
    edges {
      node {
        name {
          value
        }
        otherLanguages {
          name {
            value
          }
        }
      }
    }
  }
}

Modular content elements relationships

Each modular content property is accompanied by a sibling property suffixed with _nodes that can be used to traverse to linked nodes of modular content items.

{
  allKenticoCloudItemProjectReference {
    edges {
      node {
        related_project_references {
          name___teaser_image__name {
            value
          }
        }
        related_project_references_nodes {
          name___teaser_image__name {
            value
          }
          related_project_references_nodes {
            ...
          }
        }
      }
    }
  }
}

Modular content relationships in rich text

As with the previous example, all rich text properties with modular content also have an accompanying _nodes property.

{
  allKenticoCloudItemBlogpostReference {
    edges {
      node {
        name___teaser_image__name {
          value
        }
        summary {
          value
        }
        summary_nodes {
          system {
            codename
          }
        }
      }
    }
  }
}

Reverse link relationships

All nodes have a usedByContentItems property that reflects in which this node is used as modular content.

Development prerequisites

Further information

For more developer resources, visit the Kentico Cloud Developer Hub at https://developer.kenticocloud.com.

Feedback & Contributing

Check out the contributing contributing page to see the best places to file issues, start discussions, and begin contributing.

Analytics

4.0.0-beta1

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

3.0.0-beta4

5 years ago

3.0.0-beta3

5 years ago

3.0.0-beta1

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.3.0-beta2

5 years ago

2.3.0-beta

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.5

5 years ago

2.1.5-beta

5 years ago

2.1.4

5 years ago

2.1.4-beta2

5 years ago

2.1.4-beta

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.0

6 years ago

2.0.0-beta2

6 years ago

2.0.0-beta1

6 years ago

2.0.0-beta

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.3-beta

6 years ago

1.0.2-beta

6 years ago

1.0.1-beta

6 years ago

1.0.0-beta

6 years ago