subgraph-query

Query blockchain subgraphs with GraphQL and Apollo Client to fetch on-chain data.

Updated Sep 9, 2025
One-click install
npx skills add https://github.com/LennyDevX/nuxchain-app --skill subgraph-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subgraph-query
Source: https://github.com/LennyDevX/nuxchain-app/tree/main/.windsurf/skills/subgraph-query
Command: npx skills add https://github.com/LennyDevX/nuxchain-app --skill subgraph-query

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Query on-chain data efficiently by targeting subgraphs via GraphQL, helping developers fetch events, staking data, and marketplace information without manual API wiring.

Core Features & Use Cases

  • Build and run GraphQL queries against deployed subgraphs to fetch Deposits, Withdrawals, Rewards, or User data
  • Use with Apollo Client to integrate on-chain data into React apps and analytics dashboards
  • Use Case: Retrieve the latest 20 staking events from a given subgraph and render a real-time activity feed.

Quick Start

Install and configure Apollo Client with VITE_SUBGRAPH_URL, then run a sample query to fetch recent events.

Frequently Asked Questions about subgraph-query

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

FAQPage Schema
How do I query on-chain data using GraphQL and Apollo Client?

To query on-chain data using GraphQL and Apollo Client, you configure Apollo with a deployed subgraph endpoint and execute queries to fetch indexed events like deposits, withdrawals, or marketplace activity.

How do I fetch staking events for a blockchain analytics dashboard?

Fetching staking events for a blockchain analytics dashboard involves running a GraphQL query against a deployed subgraph via Apollo Client to retrieve recent activities such as rewards or withdrawals.

Do I need a deployed subgraph to fetch blockchain events with Apollo?

Yes, you need a deployed subgraph with an active GraphQL endpoint to fetch blockchain events with Apollo, as the subgraph indexes the on-chain data required to execute your queries.

What environment variable is required to connect Apollo Client to a subgraph?

The VITE_SUBGRAPH_URL environment variable is required to connect Apollo Client to a subgraph, providing the GraphQL endpoint location needed to execute on-chain data queries.

Can I integrate indexed blockchain data into a React app without manual API wiring?

You can integrate indexed blockchain data into a React app by using Apollo Client to query a deployed subgraph, retrieving staking or marketplace events directly without manual API wiring.

What on-chain data can I retrieve by querying a subgraph with GraphQL?

Querying a subgraph with GraphQL allows you to retrieve indexed on-chain data such as staking events, marketplace data, user information, deposits, and withdrawals for dashboards and analytics.