New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

gatsby-source-strapi-plugin-navigation-v2

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-strapi-plugin-navigation-v2

Gatsby source plugin to fetch and expose the Navigations as GraphQL nodes in Gatsby from Strapi using the strapi-plugin-navigation API.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

gatsby-source-strapi-plugin-navigation-v2

This plugin sources the strapi-plugin-navigation.

Install

yarn:

yarn add gatsby-source-strapi-plugin-navigation-v2

npm:

npm install gatsby-source-strapi-plugin-navigation-v2

How to use

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-strapi-plugin-navigation-v2",
      options: {
        apiURL: "localhost:1337",
        navigationIdsOrSlugs: [
          "api/navigation/render/1"
        ],
        type: "tree", // optional
        token: "strapi_token" // optional
      }
    }
  ]
}

Alternatively you can use an object with keys that will later map to the navigation items via the key property.

navigationIdsOrSlugs: {
  mainMenu: "api/navigation/render/1"
}

If everything works correctly you should be able to view an allStrapiNavigation option inside GraphiQL.

Example of allStrapiNavigation option in GraphiQL

Credits

Heavily inspired by edardev's sourcing plugin.

Keywords

gatsby

FAQs

Package last updated on 07 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts