1.0.2 • Published 3 years ago

gatsby-source-mydev v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Add your dev.to posts to your gatsby site!

Install

npm i gatsby-source-mydev

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-mydev`,
      options: {
        apiKey: `myApiKey15535186`,
      },
    },
  ],
}

Note: It is recommended to use a .env file to store the API key.

How to query

query MyQuery {
  allMyDev {
    nodes {
      article {
        slug
        body_markdown
        canonical_url
        cover_image
        comments_count
        description
        id
        page_views_count
        path
        public_reactions_count
        positive_reactions_count
        published
        published_at
        published_timestamp
        tag_list
        title
        type_of
        url
        user {
          github_username
          name
          profile_image
          twitter_username
          profile_image_90
          username
          website_url
        }
      }
    }
  }
}

Additional information

Author