hashnode-api

Manage Hashnode content and user data via the GraphQL API.

40|7|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill hashnode-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hashnode-api
Source: https://github.com/rawveg/skillsforge-marketplace/tree/main/hashnode-api
Command: npx skills add https://github.com/rawveg/skillsforge-marketplace --skill hashnode-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance for integrating with the Hashnode GraphQL API, including querying publications, posts, and user data, as well as mutations for publishing and subscription actions.

Core Features & Use Cases

  • GraphQL API: Interact with gql.hashnode.com for publications, posts, and user data.
  • Pagination & Caching: Implement cursor-based and offset-based pagination with caching considerations.
  • Auth & Mutations: Use PAT-based authentication for restricted operations like drafts and publishing.

Quick Start

Start with authenticating and fetching your user profile, then query a publication’s posts.

Frequently Asked Questions about hashnode-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate with the Hashnode GraphQL API?

Authenticate using Personal Access Tokens (PAT) sent in the Authorization header to gql.hashnode.com. PAT-based authentication grants access to restricted operations like drafts and publishing. Generate a PAT in your Hashnode account settings and include it in every API request.

Can I query posts and publications from Hashnode programmatically?

Yes, the Hashnode GraphQL API lets you query publications, posts, and user data via gql.hashnode.com. You can fetch post content, metadata, and user profiles by constructing GraphQL queries. Always request the id field to avoid stale data.

How do I publish content to Hashnode via API?

Use GraphQL mutations with PAT authentication to create and publish posts to Hashnode. The API supports publishing drafts and managing publication content programmatically through mutations sent to the single POST endpoint at gql.hashnode.com.

What pagination methods does the Hashnode API support?

Hashnode GraphQL API supports both cursor-based and offset-based pagination. Choose the method that fits your workflow; cursor-based pagination is typically more efficient for handling large datasets without position drift.

Can I migrate content from Hashnode's legacy API to the current GraphQL API?

Yes, the Hashnode GraphQL API replaces the legacy API and supports migrating posts, user data, and publications. The GraphQL endpoint at gql.hashnode.com provides all necessary queries and mutations for a complete data migration path.

How do I handle GraphQL errors when working with the Hashnode API?

The Hashnode GraphQL API returns standard error codes for common issues like authentication failures and invalid queries. Debug responses by checking error messages and ensuring your PAT is valid, queries are properly formatted, and required fields like id are included.