Description

A Gatsby Plugin to fetch data from Hashnode API to display it on your gatsby site.

Note: gatsby-source-hashnode does the same thing except it does not convert the images in the appropriate format that Gatsby expects. This plugin solves that.

How to install

npm i gatsby-source-hashnode-api

Examples of usage

In the gatsby-config.js, append this plugin in plugins array.

plugins: [
    'gatsby-source-hashnode-api',
    "gatsby-plugin-image",
    ...
]

How to query for data

After installing, open the graphql explorer. Paste the following code in editor and fire the query.

query MyQuery {
  allHashnodePost {
    nodes {
      brief
      title
      slug
      cuid
      coverImage {
        id
      }
    }
  }
}