0.0.19 • Published 5 years ago

gatsby-source-strapi-nova v0.0.19

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

gatsby-source-strapi-nova

Source plugin for pulling documents into Gatsby from a Strapi API. without local cache image

Install

npm install --save gatsby-source-strapi-nova

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-strapi-nova`,
    options: {
      apiURL: `http://localhost:1337`,
      queryLimit: 1000, // Default to 100
      contentTypes: [`article`, `user`],
      // Possibility to login with a strapi user, when content types are not publically available (optional).
      loginData: {
        identifier: "",
        password: "",
      },
    },
  },
]

How to query

You can query Document nodes created from your Strapi API like the following:

{
  allStrapiArticle {
    edges {
      node {
        id
        title
        content
      }
    }
  }
}