diff --git a/website/src/pages/ar/about.mdx b/website/src/pages/ar/about.mdx index 93dbeb51f658..7fda868aab9d 100644 --- a/website/src/pages/ar/about.mdx +++ b/website/src/pages/ar/about.mdx @@ -1,67 +1,46 @@ --- -title: حول The Graph +title: About The Graph +description: This page summarizes the core concepts and basics of The Graph Network. --- ## What is The Graph? -The Graph is a powerful decentralized protocol that enables seamless querying and indexing of blockchain data. It simplifies the complex process of querying blockchain data, making dapp development faster and easier. +The Graph is a decentralized protocol for indexing and querying blockchain data across [90+ networks](/supported-networks/). -## Understanding the Basics +Its data services include: -Projects with complex smart contracts such as [Uniswap](https://uniswap.org/) and NFTs initiatives like [Bored Ape Yacht Club](https://boredapeyachtclub.com/) store data on the Ethereum blockchain, making it very difficult to read anything other than basic data directly from the blockchain. +- [Subgraphs](/subgraphs/developing/subgraphs/): Open APIs to query blockchain data that can be created or queried by anyone. +- [Substreams](/substreams/introduction/): High-performance data streams for real-time blockchain processing, built with modular components. +- [Token API Beta](/token-api/quick-start/): Instant access to standardized token data requiring zero setup. -### Challenges Without The Graph +### Why Blockchain Data is Difficult to Query -In the case of the example listed above, Bored Ape Yacht Club, you can perform basic read operations on [the contract](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code). You can read the owner of a certain Ape, read the content URI of an Ape based on their ID, or read the total supply. +Reading data from blockchains requires processing smart contract events, parsing metadata from IPFS, and manually aggregating data. -- This can be done because these read operations are programmed directly into the smart contract itself. However, more advanced, specific, and real-world queries and operations like aggregation, search, relationships, and non-trivial filtering, **are not possible**. +The result is slow performance, complex infrastructure, and scalability issues. -- For instance, if you want to inquire about Apes owned by a specific address and refine your search based on a particular characteristic, you would not be able to obtain that information by directly interacting with the contract itself. +## How The Graph Solves This -- To get more data, you would have to process every single [`transfer`](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#L1746) event ever emitted, read the metadata from IPFS using the Token ID and IPFS hash, and then aggregate it. +The Graph uses a combination of cutting-edge research, core dev expertise, and independent Indexers to make blockchain data accessible for developers. -### Why is this a problem? +Find the perfect data service for you: -It would take **hours or even days** for a decentralized application (dapp) running in a browser to get an answer to these simple questions. +### 1. Custom Real-Time Data Streams -Alternatively, you have the option to set up your own server, process the transactions, store them in a database, and create an API endpoint to query the data. However, this option is [resource intensive](/resources/benefits/), needs maintenance, presents a single point of failure, and breaks important security properties required for decentralization. +**Use Case:** High-frequency trading, live analytics. -Blockchain properties, such as finality, chain reorganizations, and uncled blocks, add complexity to the process, making it time-consuming and conceptually challenging to retrieve accurate query results from blockchain data. +- [Build Substreams](/substreams/introduction/) +- [Browse Community Substreams](https://substreams.dev/) -## The Graph Provides a Solution +### 2. Instant Token Data -The Graph solves this challenge with a decentralized protocol that indexes and enables the efficient and high-performance querying of blockchain data. These APIs (indexed "Subgraphs") can then be queried with a standard GraphQL API. +**Use Case:** Wallet balances, liquidity pools, transfer events. -Today, there is a decentralized protocol that is backed by the open source implementation of [Graph Node](https://github.com/graphprotocol/graph-node) that enables this process. +- [Start with Token API](/token-api/quick-start/) -### How The Graph Functions +### 3. Flexible Historical Queries -Indexing blockchain data is very difficult, but The Graph makes it easy. The Graph learns how to index Ethereum data by using Subgraphs. Subgraphs are custom APIs built on blockchain data that extract data from a blockchain, processes it, and stores it so that it can be seamlessly queried via GraphQL. +**Use Case:** Dapp frontends, custom analytics. -#### Specifics - -- The Graph uses Subgraph descriptions, which are known as the Subgraph manifest inside the Subgraph. - -- The Subgraph description outlines the smart contracts of interest for a Subgraph, the events within those contracts to focus on, and how to map event data to the data that The Graph will store in its database. - -- When creating a Subgraph, you need to write a Subgraph manifest. - -- After writing the `subgraph manifest`, you can use the Graph CLI to store the definition in IPFS and instruct an Indexer to start indexing data for that Subgraph. - -The diagram below provides more detailed information about the flow of data after a Subgraph manifest has been deployed with Ethereum transactions. - -![A graphic explaining how The Graph uses Graph Node to serve queries to data consumers](/img/graph-dataflow.png) - -تدفق البيانات يتبع الخطوات التالية: - -1. A dapp adds data to Ethereum through a transaction on a smart contract. -2. العقد الذكي يصدر حدثا واحدا أو أكثر أثناء معالجة الإجراء. -3. Graph Node continually scans Ethereum for new blocks and the data for your Subgraph they may contain. -4. Graph Node finds Ethereum events for your Subgraph in these blocks and runs the mapping handlers you provided. The mapping is a WASM module that creates or updates the data entities that Graph Node stores in response to Ethereum events. -5. The dapp queries the Graph Node for data indexed from the blockchain, using the node's [GraphQL endpoint](https://graphql.org/learn/). The Graph Node in turn translates the GraphQL queries into queries for its underlying data store in order to fetch this data, making use of the store's indexing capabilities. The dapp displays this data in a rich UI for end-users, which they use to issue new transactions on Ethereum. The cycle repeats. - -## الخطوات التالية - -The following sections provide a more in-depth look at Subgraphs, their deployment and data querying. - -Before you write your own Subgraph, it's recommended to explore [Graph Explorer](https://thegraph.com/explorer) and review some of the already deployed Subgraphs. Each Subgraph's page includes a GraphQL playground, allowing you to query its data. +- [Explore Subgraphs](https://thegraph.com/explorer) +- [Build Your Subgraph](/subgraphs/quick-start) diff --git a/website/src/pages/ar/index.json b/website/src/pages/ar/index.json index 2443372843a8..c237a3690285 100644 --- a/website/src/pages/ar/index.json +++ b/website/src/pages/ar/index.json @@ -2,7 +2,7 @@ "title": "Home", "hero": { "title": "The Graph Docs", - "description": "Kick-start your web3 project with the tools to extract, transform, and load blockchain data.", + "description": "The Graph is a blockchain data solution that powers applications, analytics, and AI on 90+ chains. The Graph's core products include the Token API for web3 apps, Subgraphs for indexing smart contracts, and Substreams for real-time and historical data streaming.", "cta1": "How The Graph works", "cta2": "Build your first subgraph" }, @@ -19,10 +19,10 @@ "description": "Fetch and consume blockchain data with parallel execution.", "cta": "Develop with Substreams" }, - "sps": { - "title": "Substreams-Powered Subgraphs", - "description": "Boost your subgraph's efficiency and scalability by using Substreams.", - "cta": "Set up a Substreams-powered subgraph" + "tokenApi": { + "title": "Token API", + "description": "Query token data and leverage native MCP support.", + "cta": "Develop with Token API" }, "graphNode": { "title": "Graph Node", @@ -31,7 +31,7 @@ }, "firehose": { "title": "Firehose", - "description": "Extract blockchain data into flat files to enhance sync times and streaming capabilities.", + "description": "Extract blockchain data into flat files to speed sync times.", "cta": "Get started with Firehose" } }, @@ -58,6 +58,7 @@ "networks": "networks", "completeThisForm": "complete this form" }, + "seeAllNetworks": "See all {0} networks", "emptySearch": { "title": "No networks found", "description": "No networks match your search for \"{0}\"", @@ -70,7 +71,7 @@ "subgraphs": "Subgraphs", "substreams": "متعدد-السلاسل", "firehose": "Firehose", - "tokenapi": "Token API" + "tokenApi": "Token API" } }, "networkGuides": { @@ -79,10 +80,22 @@ "title": "Subgraph quick start", "description": "Kickstart your journey into subgraph development." }, - "substreams": { - "title": "متعدد-السلاسل", + "substreamsQuickStart": { + "title": "Substreams quick start", "description": "Stream high-speed data for real-time indexing." }, + "tokenApi": { + "title": "The Graph's Token API", + "description": "Query token data and leverage native MCP support." + }, + "graphExplorer": { + "title": "Graph Explorer", + "description": "Find and query existing blockchain data." + }, + "substreamsDev": { + "title": "Substreams.dev", + "description": "Access tutorials, templates, and documentation to build custom data modules." + }, "timeseries": { "title": "Timeseries & Aggregations", "description": "Learn to track metrics like daily volumes or user growth." @@ -109,12 +122,16 @@ "title": "Substreams.dev", "description": "Access tutorials, templates, and documentation to build custom data modules." }, + "customSubstreamsSinks": { + "title": "Custom Substreams Sinks", + "description": "Leverage existing Substreams sinks to access data." + }, "substreamsStarter": { "title": "Substreams starter", "description": "Leverage this boilerplate to create your first Substreams module." }, "substreamsRepo": { - "title": "Substreams repo", + "title": "Substreams GitHub repository", "description": "Study, contribute to, or customize the core Substreams framework." } } diff --git a/website/src/pages/ar/indexing/new-chain-integration.mdx b/website/src/pages/ar/indexing/new-chain-integration.mdx index b204d002b25d..ad200a351dd2 100644 --- a/website/src/pages/ar/indexing/new-chain-integration.mdx +++ b/website/src/pages/ar/indexing/new-chain-integration.mdx @@ -25,7 +25,7 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex - `eth_getBlockByHash` - `net_version` - `eth_getTransactionReceipt`، ضمن طلب دفعة استدعاء الإجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت -- `trace_filter` *(limited tracing and optionally required for Graph Node)* +- `trace_filter` _(limited tracing and optionally required for Graph Node)_ ### 2. Firehose Integration @@ -63,7 +63,7 @@ Configuring Graph Node is as easy as preparing your local environment. Once your > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +3. Run an IPFS node or use the one used by The Graph: https://ipfs.thegraph.com ## Substreams-powered Subgraphs diff --git a/website/src/pages/ar/indexing/overview.mdx b/website/src/pages/ar/indexing/overview.mdx index 200a3a6a64e5..d4a9e01205e4 100644 --- a/website/src/pages/ar/indexing/overview.mdx +++ b/website/src/pages/ar/indexing/overview.mdx @@ -110,12 +110,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 Subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used Subgraphs and serve requests for the related traffic. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| -------- | :------------------: | :---------------------------: | :-------------------------: | :-------------: | :----------------------: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -131,7 +131,7 @@ At the center of an Indexer's infrastructure is the Graph Node which monitors th - **Data endpoint** - For EVM-compatible networks, Graph Node needs to be connected to an endpoint that exposes an EVM-compatible JSON-RPC API. This may take the form of a single client or it could be a more complex setup that load balances across multiple. It's important to be aware that certain Subgraphs will require particular client capabilities such as archive mode and/or the parity tracing API. -- **IPFS node (version less than 5)** - Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during Subgraph deployment to fetch the Subgraph manifest and all linked files. Network Indexers do not need to host their own IPFS node, an IPFS node for the network is hosted at https://ipfs.network.thegraph.com. +- **IPFS node (version less than 5)** - Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during Subgraph deployment to fetch the Subgraph manifest and all linked files. Network Indexers do not need to host their own IPFS node, an IPFS node for the network is hosted at https://ipfs.thegraph.com. - **Indexer service** - Handles all required external communications with the network. Shares cost models and indexing statuses, passes query requests from gateways on to a Graph Node, and manages the query payments via state channels with the gateway. @@ -147,20 +147,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for Subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | \--http-port | - | -| 8001 | GraphQL WS
(for Subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | \--ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | \--admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | \--index-node-port | - | -| 8040 | Prometheus metrics | /metrics | \--metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------- | ---------------------------------------------- | ------------------ | -------------------- | +| 8000 | GraphQL HTTP server
(for Subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | \--http-port | - | +| 8001 | GraphQL WS
(for Subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | \--ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | \--admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | \--index-node-port | - | +| 8040 | Prometheus metrics | /metrics | \--metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid Subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | \--port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | \--metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------- | ----------------------------------------------------------- | --------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid Subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | \--port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | \--metrics-port | - | #### Indexer Agent @@ -331,7 +331,7 @@ createdb graph-node cargo run -p graph-node --release -- \ --postgres-url postgresql://[USERNAME]:[PASSWORD]@localhost:5432/graph-node \ --ethereum-rpc [NETWORK_NAME]:[URL] \ - --ipfs https://ipfs.network.thegraph.com + --ipfs https://ipfs.thegraph.com ``` #### Getting started using Docker @@ -708,42 +708,6 @@ Note that supported action types for allocation management have different input Cost models provide dynamic pricing for queries based on market and query attributes. The Indexer Service shares a cost model with the gateways for each Subgraph for which they intend to respond to queries. The gateways, in turn, use the cost model to make Indexer selection decisions per query and to negotiate payment with chosen Indexers. -#### Agora - -The Agora language provides a flexible format for declaring cost models for queries. An Agora price model is a sequence of statements that execute in order for each top-level query in a GraphQL query. For each top-level query, the first statement which matches it determines the price for that query. - -A statement is comprised of a predicate, which is used for matching GraphQL queries, and a cost expression which when evaluated outputs a cost in decimal GRT. Values in the named argument position of a query may be captured in the predicate and used in the expression. Globals may also be set and substituted in for placeholders in an expression. - -Example cost model: - -``` -# This statement captures the skip value, -# uses a boolean expression in the predicate to match specific queries that use `skip` -# and a cost expression to calculate the cost based on the `skip` value and the SYSTEM_LOAD global -query { pairs(skip: $skip) { id } } when $skip > 2000 => 0.0001 * $skip * $SYSTEM_LOAD; - -# This default will match any GraphQL expression. -# It uses a Global substituted into the expression to calculate cost -default => 0.1 * $SYSTEM_LOAD; -``` - -Example query costing using the above model: - -| Query | Price | -| ---------------------------------------------------------------------------- | ------- | -| { pairs(skip: 5000) { id } } | 0.5 GRT | -| { tokens { symbol } } | 0.1 GRT | -| { pairs(skip: 5000) { id } tokens { symbol } } | 0.6 GRT | - -#### Applying the cost model - -Cost models are applied via the Indexer CLI, which passes them to the Indexer Management API of the Indexer agent for storing in the database. The Indexer Service will then pick them up and serve the cost models to gateways whenever they ask for them. - -```sh -indexer cost set variables '{ "SYSTEM_LOAD": 1.4 }' -indexer cost set model my_model.agora -``` - ## Interacting with the network ### Stake in the protocol diff --git a/website/src/pages/ar/indexing/tooling/graph-node.mdx b/website/src/pages/ar/indexing/tooling/graph-node.mdx index edde8a157fd3..56cea09618e3 100644 --- a/website/src/pages/ar/indexing/tooling/graph-node.mdx +++ b/website/src/pages/ar/indexing/tooling/graph-node.mdx @@ -26,7 +26,7 @@ While some Subgraphs may just require a full node, some may have indexing featur ### IPFS Nodes -Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during Subgraph deployment to fetch the Subgraph manifest and all linked files. Network indexers do not need to host their own IPFS node. An IPFS node for the network is hosted at https://ipfs.network.thegraph.com. +Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during Subgraph deployment to fetch the Subgraph manifest and all linked files. Network indexers do not need to host their own IPFS node. An IPFS node for the network is hosted at https://ipfs.thegraph.com. ### Prometheus metrics server @@ -66,7 +66,7 @@ createdb graph-node cargo run -p graph-node --release -- \ --postgres-url postgresql://[USERNAME]:[PASSWORD]@localhost:5432/graph-node \ --ethereum-rpc [NETWORK_NAME]:[URL] \ - --ipfs https://ipfs.network.thegraph.com + --ipfs https://ipfs.thegraph.com ``` ### Getting started with Kubernetes @@ -77,15 +77,20 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for Subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | \--http-port | - | -| 8001 | GraphQL WS
(for Subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | \--ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | \--admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | \--index-node-port | - | -| 8040 | Prometheus metrics | /metrics | \--metrics-port | - | - -> **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------- | ---------------------------------------------- | ------------------ | -------------------- | +| 8000 | GraphQL HTTP server
(for Subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | \--http-port | - | +| 8001 | GraphQL WS
(for Subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | \--ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | \--admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | \--index-node-port | - | +| 8040 | Prometheus metrics | /metrics | \--metrics-port | - | + +> **WARNING: Never expose Graph Node's administrative ports to the public**. +> +> - Exposing Graph Node's internal ports can lead to a full system compromise. +> - These ports must remain **private**: JSON-RPC Admin endpoint, Indexing Status API, and PostgreSQL. +> - Do not expose 8000 (GraphQL HTTP) and 8001 (GraphQL WebSocket) directly to the internet. Even though these are used for GraphQL queries, they should ideally be proxied though `indexer-agent` and served behind a production-grade proxy. +> - Lock everything else down with firewalls or private networks. ## Advanced Graph Node configuration @@ -330,7 +335,7 @@ Database tables that store entities seem to generally come in two varieties: 'tr For account-like tables, `graph-node` can generate queries that take advantage of details of how Postgres ends up storing data with such a high rate of change, namely that all of the versions for recent blocks are in a small subsection of the overall storage for such a table. -The command `graphman stats show shows, for each entity type/table in a deployment, how many distinct entities, and how many entity versions each table contains. That data is based on Postgres-internal estimates, and is therefore necessarily imprecise, and can be off by an order of magnitude. A `-1` in the `entities` column means that Postgres believes that all rows contain a distinct entity. +The command `graphman stats show ` shows, for each entity type/table in a deployment, how many distinct entities, and how many entity versions each table contains. That data is based on Postgres-internal estimates, and is therefore necessarily imprecise, and can be off by an order of magnitude. A `-1` in the `entities` column means that Postgres believes that all rows contain a distinct entity. In general, tables where the number of distinct entities are less than 1% of the total number of rows/entity versions are good candidates for the account-like optimization. When the output of `graphman stats show` indicates that a table might benefit from this optimization, running `graphman stats show ` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/ar/resources/claude-mcp.mdx b/website/src/pages/ar/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/ar/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/ar/subgraphs/_meta-titles.json b/website/src/pages/ar/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/ar/subgraphs/_meta-titles.json +++ b/website/src/pages/ar/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/ar/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/ar/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/ar/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/ar/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/ar/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/ar/subgraphs/developing/creating/graph-ts/api.mdx index a721f6bcd8d4..ef43760cfdbf 100644 --- a/website/src/pages/ar/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/ar/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| الاصدار | ملاحظات الإصدار | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| الاصدار | ملاحظات الإصدار | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### الأنواع المضمنة (Built-in) diff --git a/website/src/pages/ar/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/ar/subgraphs/developing/creating/starting-your-subgraph.mdx index fa6c44e61fb2..b7d5f7168427 100644 --- a/website/src/pages/ar/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/ar/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| الاصدار | ملاحظات الإصدار | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| الاصدار | ملاحظات الإصدار | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/ar/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/ar/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/ar/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/ar/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/ar/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/ar/subgraphs/developing/deploying/using-subgraph-studio.mdx index 1e0826bfe148..15ac3901d9fb 100644 --- a/website/src/pages/ar/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/ar/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/ar/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/ar/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/ar/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/ar/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Jedná se o novou funkci, která bude k dispozici v uzlu Graf 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/cs/resources/claude-mcp.mdx b/website/src/pages/cs/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/cs/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/cs/subgraphs/_meta-titles.json b/website/src/pages/cs/subgraphs/_meta-titles.json index c2d850dfc35c..815ad1b8f4b4 100644 --- a/website/src/pages/cs/subgraphs/_meta-titles.json +++ b/website/src/pages/cs/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Osvědčené postupy" + "best-practices": "Osvědčené postupy", + "mcp": "MCP" } diff --git a/website/src/pages/cs/subgraphs/developing/creating/advanced.mdx b/website/src/pages/cs/subgraphs/developing/creating/advanced.mdx index e8db267667c0..0ae33c1efe69 100644 --- a/website/src/pages/cs/subgraphs/developing/creating/advanced.mdx +++ b/website/src/pages/cs/subgraphs/developing/creating/advanced.mdx @@ -246,7 +246,7 @@ The CID of the file as a readable string can be accessed via the `dataSource` as const cid = dataSource.stringParam() ``` -Příklad +Příklad ```typescript import { json, Bytes, dataSource } from '@graphprotocol/graph-ts' diff --git a/website/src/pages/cs/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/cs/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/cs/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/cs/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/cs/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/cs/subgraphs/developing/creating/graph-ts/api.mdx index 87734452737d..e794c1caa32c 100644 --- a/website/src/pages/cs/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/cs/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ Knihovna `@graphprotocol/graph-ts` poskytuje následující API: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Verze | Poznámky vydání | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Přidá ověření existence polí ve schéma při ukládání entity. | -| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum
Přidání pole `receipt` do objektu Ethereum událost | -| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
Přidáno `baseFeePerGas` do objektu Ethereum bloku | +| Verze | Poznámky vydání | +| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Přidá ověření existence polí ve schéma při ukládání entity. | +| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum
Přidání pole `receipt` do objektu Ethereum událost | +| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
Přidáno `baseFeePerGas` do objektu Ethereum bloku | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | +| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | ### Vestavěné typy @@ -147,7 +147,7 @@ _Math_ - `x.notEqual(y: BigInt): bool` –lze zapsat jako `x != y`. - `x.lt(y: BigInt): bool` – lze zapsat jako `x < y`. - `x.le(y: BigInt): bool` – lze zapsat jako `x <= y`. -- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. +- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. - `x.ge(y: BigInt): bool` – lze zapsat jako `x >= y`. - `x.neg(): BigInt` – lze zapsat jako `-x`. - `x.divDecimal(y: BigDecimal): BigDecimal` – dělí desetinným číslem, čímž získá desetinný výsledek. diff --git a/website/src/pages/cs/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/cs/subgraphs/developing/creating/starting-your-subgraph.mdx index a0fcb52875ca..04f1eee28246 100644 --- a/website/src/pages/cs/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/cs/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Verze | Poznámky vydání | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | +| Verze | Poznámky vydání | +| :---: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | | 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/cs/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/cs/subgraphs/developing/deploying/multiple-networks.mdx index e9848601ebc7..796f1de30b74 100644 --- a/website/src/pages/cs/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/cs/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/cs/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/cs/subgraphs/developing/deploying/using-subgraph-studio.mdx index 14be0175123c..01056c092ca2 100644 --- a/website/src/pages/cs/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/cs/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/cs/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/cs/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 29c75273aa17..6a3f991fa0b6 100644 --- a/website/src/pages/cs/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/cs/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` eine vollständige Zählung der Tabelle durch - das kann langsam sein, liefert aber ein genaues Maß für das Verhältnis von eindeutigen Entitäten zu den gesamten Entitätsversionen. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Entfernen von Subgraphen -> This is new functionality, which will be available in Graph Node 0.29.x - Irgendwann möchte ein Indexer vielleicht einen bestimmten Subgraph entfernen. Dies kann einfach mit `graphman drop` gemacht werden, welches einen Einsatz und alle indizierten Daten löscht. Der Einsatz kann entweder als Name eines Subgraphen, als IPFS-Hash `Qm..` oder als Datenbank-Namensraum `sgdNNN` angegeben werden. Weitere Dokumentation ist [hier](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop) verfügbar. diff --git a/website/src/pages/de/resources/claude-mcp.mdx b/website/src/pages/de/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5e1e68159023 --- /dev/null +++ b/website/src/pages/de/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Voraussetzungen + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/de/subgraphs/_meta-titles.json b/website/src/pages/de/subgraphs/_meta-titles.json index 1338cbaa797d..b2c9cd10eaee 100644 --- a/website/src/pages/de/subgraphs/_meta-titles.json +++ b/website/src/pages/de/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Abfragen", "developing": "Entwicklung", "guides": "Anleitungen", - "best-practices": "Bewährte Praktiken" + "best-practices": "Bewährte Praktiken", + "mcp": "MCP" } diff --git a/website/src/pages/de/subgraphs/developing/creating/advanced.mdx b/website/src/pages/de/subgraphs/developing/creating/advanced.mdx index e1245dcae9a8..38b0aead992e 100644 --- a/website/src/pages/de/subgraphs/developing/creating/advanced.mdx +++ b/website/src/pages/de/subgraphs/developing/creating/advanced.mdx @@ -8,11 +8,11 @@ Fügen Sie fortgeschrittene Subgraph-Funktionen hinzu und implementieren Sie sie Ab `specVersion` `0.0.4` müssen Subgraph-Funktionen explizit im Abschnitt `features` auf der obersten Ebene der Manifestdatei unter Verwendung ihres `camelCase`-Namens deklariert werden, wie in der folgenden Tabelle aufgeführt: -| Funktion | Name | -| ------------------------------------------------- | ---------------- | -| [Non-fatal errors](#non-fatal-errors) | `nonFatalErrors` | -| [Volltextsuche](#defining-fulltext-search-fields) | "Volltextsuche" | -| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | +| Funktion | Name | +| ----------------------------------------------------- | ---------------- | +| [Non-fatal errors](#non-fatal-errors) | `nonFatalErrors` | +| [Volltextsuche](#defining-fulltext-search-fields) | "Volltextsuche" | +| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | Wenn ein Subgraph beispielsweise die Funktionen **Volltextsuche** und **Nicht fatale Fehler** verwendet, sollte das Feld „Features“ im Manifest lauten: @@ -173,17 +173,17 @@ Ursprüngliche kombinierte Einheit: ```graphql type Token @entity { - id: ID! - tokenID: BigInt! - tokenURI: String! - externalURL: String! - ipfsURI: String! - image: String! - name: String! - description: String! - type: String! - updatedAtTimestamp: BigInt - owner: User! + id: ID! + tokenID: BigInt! + tokenURI: String! + externalURL: String! + ipfsURI: String! + image: String! + name: String! + description: String! + type: String! + updatedAtTimestamp: BigInt + owner: User! } ``` @@ -191,20 +191,20 @@ Neu, geteilte Einheit: ```graphql type Token @entity { - id: ID! - tokenID: BigInt! - tokenURI: String! - ipfsURI: TokenMetadata - updatedAtTimestamp: BigInt - owner: String! + id: ID! + tokenID: BigInt! + tokenURI: String! + ipfsURI: TokenMetadata + updatedAtTimestamp: BigInt + owner: String! } type TokenMetadata @entity { - id: ID! - image: String! - externalURL: String! - name: String! - description: String! + id: ID! + image: String! + externalURL: String! + name: String! + description: String! } ``` @@ -528,7 +528,7 @@ subgraph.yaml„ unter Verwendung von “event.params ```yaml Aufrufe: - - ERC20DecimalsToken0: ERC20[event.params.token0].decimals() + - ERC20DecimalsToken0: ERC20[event.params.token0].decimals() ``` ### Grafting auf bestehende Subgraphen @@ -542,8 +542,8 @@ Ein Subgraph wird auf einen Basis-Subgraph gepfropft, wenn das Subgraph-Manifest ```yaml Beschreibung: ... graft: - base: Qm ... # Subgraph ID des Basis-Subgraphen - block: 7345624 # Blocknummer + base: Qm ... # Subgraph ID des Basis-Subgraphen + block: 7345624 # Blocknummer ``` Wenn ein Subgraph, dessen Manifest einen „graft“-Block enthält, bereitgestellt wird, kopiert Graph Node die Daten des ‚Basis‘-Subgraphen bis einschließlich des angegebenen „Blocks“ und fährt dann mit der Indizierung des neuen Subgraphen ab diesem Block fort. Der Basis-Subgraph muss auf der Ziel-Graph-Node-Instanz existieren und mindestens bis zum angegebenen Block indexiert sein. Aufgrund dieser Einschränkung sollte Grafting nur während der Entwicklung oder in Notfällen verwendet werden, um die Erstellung eines äquivalenten, nicht gepfropften Subgraphen zu beschleunigen. diff --git a/website/src/pages/de/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/de/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 9dace9f39aaf..89111c270bba 100644 --- a/website/src/pages/de/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/de/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch-Änderungen + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Geringfügige Änderungen diff --git a/website/src/pages/de/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/de/subgraphs/developing/creating/graph-ts/api.mdx index c56511a3a35c..f6df454bbca8 100644 --- a/website/src/pages/de/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/de/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ Die Bibliothek `@graphprotocol/graph-ts` bietet die folgenden APIs: Die `apiVersion` im Subgraph-Manifest gibt die Mapping-API-Version an, die von Graph Node für einen bestimmten Subgraph ausgeführt wird. -| Version | Hinweise zur Version | -| :-: | --- | -| 0.0.9 | Fügt neue Host-Funktionen hinzu [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Fügt eine Validierung für das Vorhandensein von Feldern im Schema beim Speichern einer Entität hinzu. | -| 0.0.7 | Klassen `TransactionReceipt` und `Log` zu den Ethereum-Typen hinzugefügt<br />Feld `Receipt` zum Ethereum Event Objekt hinzugefügt | -| 0.0.6 | Feld `nonce` zum Ethereum Transaction Objekt hinzugefügt<br />`baseFeePerGas` zum Ethereum Block Objekt hinzugefügt | -| 0.0.5 | AssemblyScript wurde auf Version 0.19.10 aktualisiert (dies beinhaltet einige Änderungen, siehe [`Migrationsanleitung`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` umbenannt in `ethereum.transaction.gasLimit` | -| 0.0.4 | Feld `functionSignature` zum Ethereum SmartContractCall Objekt hinzugefügt | -| 0.0.3 | Feld `von` zum Ethereum Call Objekt hinzugefügt<br />`ethereum.call.address` umbenannt in `ethereum.call.to` | -| 0.0.2 | Feld „Eingabe“ zum Ethereum-Transaktionsobjekt hinzugefügt | +| Version | Hinweise zur Version | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Fügt neue Host-Funktionen hinzu [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Fügt eine Validierung für das Vorhandensein von Feldern im Schema beim Speichern einer Entität hinzu. | +| 0.0.7 | Klassen `TransactionReceipt` und `Log` zu den Ethereum-Typen hinzugefügt<br />Feld `Receipt` zum Ethereum Event Objekt hinzugefügt | +| 0.0.6 | Feld `nonce` zum Ethereum Transaction Objekt hinzugefügt<br />`baseFeePerGas` zum Ethereum Block Objekt hinzugefügt | +| 0.0.5 | AssemblyScript wurde auf Version 0.19.10 aktualisiert (dies beinhaltet einige Änderungen, siehe [`Migrationsanleitung`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` umbenannt in `ethereum.transaction.gasLimit` | +| 0.0.4 | Feld `functionSignature` zum Ethereum SmartContractCall Objekt hinzugefügt | +| 0.0.3 | Feld `von` zum Ethereum Call Objekt hinzugefügt<br />`ethereum.call.address` umbenannt in `ethereum.call.to` | +| 0.0.2 | Feld „Eingabe“ zum Ethereum-Transaktionsobjekt hinzugefügt | ### Integrierte Typen diff --git a/website/src/pages/de/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/de/subgraphs/developing/creating/starting-your-subgraph.mdx index c198baf1e1f1..a2f39804cff0 100644 --- a/website/src/pages/de/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/de/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Starten Sie den Prozess und erstellen Sie einen Subgraphen, der Ihren Anforderun Erkunden Sie zusätzliche [Ressourcen für APIs](/subgraphs/developing/creating/graph-ts/README/) und führen Sie lokale Tests mit [Matchstick](/subgraphs/developing/creating/unit-testing-framework/) durch. -| Version | Hinweise zur Version | -| :-: | --- | -| 1.2.0 | Unterstützung für [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) hinzugefügt & `eth_call` erklärt | -| 1.1.0 | Unterstützt [Timeseries & Aggregations](#timeseries-and-aggregations). Unterstützung für Typ `Int8` für `id` hinzugefügt. | -| 1.0.0 | Unterstützt die Funktion [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) zum Beschneiden von Subgraphen | -| 0.0.9 | Unterstützt `endBlock` Funktion | -| 0.0.8 | Unterstützung für die Abfrage von [Block-Handlern](/developing/creating-a-subgraph/#polling-filter) und [Initialisierungs-Handlern](/developing/creating-a-subgraph/#once-filter) hinzugefügt. | -| 0.0.7 | Unterstützung für [Dateidatenquellen](/developing/creating-a-subgraph/#file-data-sources) hinzugefügt. | -| 0.0.6 | Unterstützt schnelle [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) Berechnungsvariante. | -| 0.0.5 | Unterstützung für Event-Handler mit Zugriff auf Transaktionsbelege hinzugefügt. | -| 0.0.4 | Unterstützung für die Verwaltung von Subgraphen-Features wurde hinzugefügt. | +| Version | Hinweise zur Version | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 1.2.0 | Unterstützung für [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) hinzugefügt & `eth_call` erklärt | +| 1.1.0 | Unterstützt [Timeseries & Aggregations](#timeseries-and-aggregations). Unterstützung für Typ `Int8` für `id` hinzugefügt. | +| 1.0.0 | Unterstützt die Funktion [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) zum Beschneiden von Subgraphen | +| 0.0.9 | Unterstützt `endBlock` Funktion | +| 0.0.8 | Unterstützung für die Abfrage von [Block-Handlern](/developing/creating-a-subgraph/#polling-filter) und [Initialisierungs-Handlern](/developing/creating-a-subgraph/#once-filter) hinzugefügt. | +| 0.0.7 | Unterstützung für [Dateidatenquellen](/developing/creating-a-subgraph/#file-data-sources) hinzugefügt. | +| 0.0.6 | Unterstützt schnelle [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) Berechnungsvariante. | +| 0.0.5 | Unterstützung für Event-Handler mit Zugriff auf Transaktionsbelege hinzugefügt. | +| 0.0.4 | Unterstützung für die Verwaltung von Subgraphen-Features wurde hinzugefügt. | diff --git a/website/src/pages/de/subgraphs/developing/creating/unit-testing-framework.mdx b/website/src/pages/de/subgraphs/developing/creating/unit-testing-framework.mdx index 357617cfce50..f8733d6ef561 100644 --- a/website/src/pages/de/subgraphs/developing/creating/unit-testing-framework.mdx +++ b/website/src/pages/de/subgraphs/developing/creating/unit-testing-framework.mdx @@ -155,7 +155,7 @@ Also you can check out the video series on ["How to use Matchstick to write unit ## Struktur der Tests -WICHTIG: Die unten beschriebene Teststruktur hängt von der Version `matchstick-as` >=0.5.0\*\*\_ ab. +WICHTIG: Die unten beschriebene Teststruktur hängt von der Version `matchstick-as` >=0.5.0\*\*_ ab. ### describe() @@ -728,12 +728,12 @@ import { addMetadata, assert, createMockedFunction, clearStore, test } from 'mat import { Gravity } from '../../generated/Gravity/Gravity' import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' -let contractAddress = Address.fromString('0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7') +let contractAddress = Address. fromString('0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7') let expectedResult = Address.fromString('0x90cBa2Bbb19ecc291A12066Fd8329D65FA1f1947') -let bigIntParam = BigInt.fromString('1234') +let bigIntParam = BigInt. fromString('1234') createMockedFunction(contractAddress, 'gravatarToOwner', 'gravatarToOwner(uint256):(address)') - .withArgs([ethereum.Value.fromSignedBigInt(bigIntParam)]) - .returns([ethereum.Value.fromAddress(Address.fromString('0x90cBa2Bbb19ecc291A12066Fd8329D65FA1f1947'))]) +.withArgs([ethereum.Value.fromSignedBigInt(bigIntParam)]) +.returns([ethereum.Value.fromAddress(Address. fromString('0x90cBa2Bbb19ecc291A12066Fd8329D65FA1f1947'))]) let gravity = Gravity.bind(contractAddress) let result = gravity.gravatarToOwner(bigIntParam) diff --git a/website/src/pages/de/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/de/subgraphs/developing/deploying/multiple-networks.mdx index 6db33ed6bf1e..9d918a953466 100644 --- a/website/src/pages/de/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/de/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Jeder Subgraph, der von dieser Richtlinie betroffen ist, hat die Möglichkeit, d Wenn ein Subgraph erfolgreich synchronisiert wird, ist das ein gutes Zeichen dafür, dass er für immer gut laufen wird. Neue Auslöser im Netzwerk könnten jedoch dazu führen, dass Ihr Subgraph auf eine ungetestete Fehlerbedingung stößt, oder er könnte aufgrund von Leistungsproblemen oder Problemen mit den Knotenbetreibern ins Hintertreffen geraten. -Graph Node stellt einen GraphQL-Endpunkt zur Verfügung, den Sie abfragen können, um den Status Ihres Subgraphen zu überprüfen. Auf dem gehosteten Dienst ist er unter `https://api.thegraph.com/index-node/graphql` verfügbar. Auf einem lokalen Knoten ist er standardmäßig auf Port `8030/graphql` verfügbar. Das vollständige Schema für diesen Endpunkt finden Sie [hier](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Hier ist ein Datenbeispiel für eine Abfrage, die den Status der aktuellen Version eines Subgraphen überprüft: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/de/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/de/subgraphs/developing/deploying/using-subgraph-studio.mdx index 4f784b4304b8..2428cc8eca51 100644 --- a/website/src/pages/de/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/de/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Sobald Sie bereit sind, können Sie Ihren Subgraph in Subgraph Studio bereitstellen. > Wenn Sie einen Subgraphen mit der Befehlszeilenschnittstelle bereitstellen, wird er in das Studio übertragen, wo Sie ihn testen und die Metadaten aktualisieren können. Durch diese Aktion wird Ihr Subgraph nicht im dezentralen Netzwerk veröffentlicht. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Verwenden Sie den folgenden CLI-Befehl, um Ihren Subgraph zu verteilen: @@ -104,6 +106,8 @@ Nach der Ausführung dieses Befehls wird die CLI nach einer Versionsbezeichnung Nach dem Deployment können Sie Ihren Subgraph testen (entweder in Subgraph Studio oder in Ihrer eigenen Anwendung, mit der Deployment-Query-URL), eine weitere Version deployen, die Metadaten aktualisieren und im [Graph Explorer](https://thegraph.com/explorer) veröffentlichen, wenn Sie bereit sind. +> **Note**: The development query URL is limited to 3,000 queries per day. + Verwenden Sie Subgraph Studio, um die Protokolle auf dem Dashboard zu überprüfen und nach Fehlern in Ihrem Subgraphen zu suchen. ## Veröffentlichen Sie Ihren Subgraph diff --git a/website/src/pages/de/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/de/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2fa5e3654038..474081f817d5 100644 --- a/website/src/pages/de/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/de/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Se trata de una nueva funcionalidad, que estará disponible en Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/es/resources/claude-mcp.mdx b/website/src/pages/es/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/es/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/es/subgraphs/_meta-titles.json b/website/src/pages/es/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/es/subgraphs/_meta-titles.json +++ b/website/src/pages/es/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/es/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/es/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/es/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/es/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/es/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/es/subgraphs/developing/creating/graph-ts/api.mdx index 7673a925ad21..4479673b2af3 100644 --- a/website/src/pages/es/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/es/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Notas del lanzamiento | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notas del lanzamiento | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Tipos Incorporados diff --git a/website/src/pages/es/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/es/subgraphs/developing/creating/starting-your-subgraph.mdx index aad5349fb149..669a29583ee8 100644 --- a/website/src/pages/es/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/es/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Notas del lanzamiento | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Notas del lanzamiento | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/es/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/es/subgraphs/developing/deploying/multiple-networks.mdx index a96efc430a61..33807eefc5be 100644 --- a/website/src/pages/es/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/es/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/es/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/es/subgraphs/developing/deploying/using-subgraph-studio.mdx index 29eed7358005..82b865a94db2 100644 --- a/website/src/pages/es/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/es/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/es/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/es/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 67c076d0a156..ac0a6b970883 100644 --- a/website/src/pages/es/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/es/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` effectuera un comptage complet de la table - ce qui peut être lent, mais donne une mesure précise du ratio d'entités distinctes par rapport au nombre total de versions d'entités. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Il s'agit d'une nouvelle fonctionnalité qui sera disponible dans Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/fr/resources/claude-mcp.mdx b/website/src/pages/fr/resources/claude-mcp.mdx new file mode 100644 index 000000000000..ef0b3c7a0d43 --- /dev/null +++ b/website/src/pages/fr/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prérequis + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/fr/subgraphs/_meta-titles.json b/website/src/pages/fr/subgraphs/_meta-titles.json index e10948c648a1..d4c4fd0c68b3 100644 --- a/website/src/pages/fr/subgraphs/_meta-titles.json +++ b/website/src/pages/fr/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "Guides pratiques", - "best-practices": "Les meilleures pratiques" + "best-practices": "Les meilleures pratiques", + "mcp": "MCP" } diff --git a/website/src/pages/fr/subgraphs/developing/creating/advanced.mdx b/website/src/pages/fr/subgraphs/developing/creating/advanced.mdx index 5992294de057..b64f4462d9d3 100644 --- a/website/src/pages/fr/subgraphs/developing/creating/advanced.mdx +++ b/website/src/pages/fr/subgraphs/developing/creating/advanced.mdx @@ -8,11 +8,11 @@ Ajouter et mettre en œuvre des fonctionnalités avancées de subgraph pour amé A partir de la `specVersion` `0.0.4`, les fonctionnalités de Subgraph doivent être explicitement déclarées dans la section `features` au premier niveau du fichier manifest, en utilisant leur nom `camelCase`, comme listé dans le tableau ci-dessous : -| Fonctionnalité | Nom | -| --------------------------------------------------------- | ---------------- | -| [Erreurs non fatales](#non-fatal-errors) | `nonFatalErrors` | -| [Recherche plein texte](#defining-fulltext-search-fields) | `fullTextSearch` | -| [Greffage](#grafting-onto-existing-subgraphs) | `grafting` | +| Fonctionnalité | Nom | +| ----------------------------------------------------------- | ---------------- | +| [Erreurs non fatales](#non-fatal-errors) | `nonFatalErrors` | +| [Recherche plein texte](#defining-fulltext-search-fields) | `fullTextSearch` | +| [Greffage](#grafting-onto-existing-subgraphs) | `grafting` | Par exemple, si un subgraph utilise les fonctionnalités **Recherche plein texte** et **Erreurs non fatales**, le champ `features` dans le manifeste devrait être : diff --git a/website/src/pages/fr/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/fr/subgraphs/developing/creating/graph-ts/CHANGELOG.md index e1411a2c1465..04cb4a8d91ec 100644 --- a/website/src/pages/fr/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/fr/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Changements dans les correctifs + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/fr/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/fr/subgraphs/developing/creating/graph-ts/api.mdx index 90bc58c98943..63c7591d8398 100644 --- a/website/src/pages/fr/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/fr/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ La bibliothèque `@graphprotocol/graph-ts` fournit les API suivantes : La `apiVersion` dans le manifeste du subgraph spécifie la version de l'API de mappage qui est exécutée par Graph Node pour un subgraph donné. -| Version | Notes de version | -| :-: | --- | -| 0.0.9 | Ajout de nouvelles fonctions hôtes [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Ajout de la validation pour l'existence des champs dans le schéma lors de l'enregistrement d'une entité. | -| 0.0.7 | Ajout des classes `TransactionReceipt` et `Log`aux types Ethereum
Ajout du champ `receipt` à l'objet Ethereum Event | -| 0.0.6 | Ajout du champ `nonce` à l'objet Ethereum Transaction
Ajout de `baseFeePerGas` à l'objet Ethereum Block | -| 0.0.5 | AssemblyScript mis à jour vers la version 0.19.10 (cela inclut des changements de rupture, veuillez consulter le [`Guide de migration`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renommé en `ethereum.transaction.gasLimit` | -| 0.0.4 | Ajout du champ `functionSignature` à l'objet Ethereum SmartContractCall | -| 0.0.3 | Ajout du champ `from` à l'objet Ethereum Call
`ethereum.call.address` renommé en `ethereum.call.to` | -| 0.0.2 | Ajout du champ `input` à l'objet Ethereum Transaction | +| Version | Notes de version | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0.0.9 | Ajout de nouvelles fonctions hôtes [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Ajout de la validation pour l'existence des champs dans le schéma lors de l'enregistrement d'une entité. | +| 0.0.7 | Ajout des classes `TransactionReceipt` et `Log`aux types Ethereum
Ajout du champ `receipt` à l'objet Ethereum Event | +| 0.0.6 | Ajout du champ `nonce` à l'objet Ethereum Transaction
Ajout de `baseFeePerGas` à l'objet Ethereum Block | +| 0.0.5 | AssemblyScript mis à jour vers la version 0.19.10 (cela inclut des changements de rupture, veuillez consulter le [`Guide de migration`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renommé en `ethereum.transaction.gasLimit` | +| 0.0.4 | Ajout du champ `functionSignature` à l'objet Ethereum SmartContractCall | +| 0.0.3 | Ajout du champ `from` à l'objet Ethereum Call
`ethereum.call.address` renommé en `ethereum.call.to` | +| 0.0.2 | Ajout du champ `input` à l'objet Ethereum Transaction | ### Types intégrés @@ -770,44 +770,44 @@ Lorsque le type d'une valeur est certain, il peut être converti en un [type int ### Référence des conversions de types -| Source(s) | Destination | Fonctions de conversion | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | aucune | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | aucune | -| Bytes (signé) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (non signé) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | aucune | -| int32 | i32 | aucune | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | aucune | -| int64 - int256 | BigInt | aucune | -| uint32 - uint256 | BigInt | aucune | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Fonctions de conversion | +| --------------------- | -------------------- | -------------------------------- | +| Address | Bytes | aucune | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | aucune | +| Bytes (signé) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (non signé) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | aucune | +| int32 | i32 | aucune | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | aucune | +| int64 - int256 | BigInt | aucune | +| uint32 - uint256 | BigInt | aucune | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Métadonnées de la source de données diff --git a/website/src/pages/fr/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/fr/subgraphs/developing/creating/starting-your-subgraph.mdx index 247c5e721c94..2e161787acff 100644 --- a/website/src/pages/fr/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/fr/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Commencez le processus et construisez un subgraph qui correspond à vos besoins Explorez d'autres [ressources pour les API](/subgraphs/developing/creating/graph-ts/README/) et effectuez des tests en local avec [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Notes de version | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supporte la fonctionnalité [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) pour élaguer les subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Notes de version | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supporte la fonctionnalité [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) pour élaguer les subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/fr/subgraphs/developing/creating/unit-testing-framework.mdx b/website/src/pages/fr/subgraphs/developing/creating/unit-testing-framework.mdx index 61b209325211..44f1d8adb180 100644 --- a/website/src/pages/fr/subgraphs/developing/creating/unit-testing-framework.mdx +++ b/website/src/pages/fr/subgraphs/developing/creating/unit-testing-framework.mdx @@ -1216,8 +1216,8 @@ type TokenLockMetadata @entity { ##### Exemple de gestionnaire ```typescript -export function handleMetadata(content: Bytes): void { - // dataSource.stringParams() renvoie le CID du fichier de la source de données +export function handleMetadata(content : Bytes) : void { + // dataSource.stringParams() renvoie le CID du fichier de la source de données // stringParam() sera simulé dans le test du gestionnaire // pour plus d'informations https://thegraph.com/docs/en/developing/creating-a-subgraph/#create-a-new-handler-to-process-files let tokenMetadata = new TokenLockMetadata(dataSource.stringParam()) diff --git a/website/src/pages/fr/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/fr/subgraphs/developing/deploying/multiple-networks.mdx index 2916c6fa07ad..5e4b27c8b13b 100644 --- a/website/src/pages/fr/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/fr/subgraphs/developing/deploying/multiple-networks.mdx @@ -211,7 +211,7 @@ Chaque Subgraph concerné par cette politique a la possibilité de rétablir la Si un Subgraph se synchronise avec succès, c'est le signe qu'il continuera à fonctionner correctement pour toujours. Toutefois, de nouveaux déclencheurs sur le réseau peuvent entraîner une condition d'erreur non testée dans votre Subgraph ou un retard dû à des problèmes de performance ou à des problèmes avec les opérateurs de nœuds. -Graph Node expose un endpoint GraphQL que vous pouvez interroger pour vérifier l'état de votre subgraph. Sur le service hébergé, il est disponible à `https://api.thegraph.com/index-node/graphql`. Sur un nœud local, il est disponible sur le port `8030/graphql` par défaut. Le schéma complet de ce point d'accès peut être trouvé [ici](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Voici un exemple de requête qui vérifie le statut de la version actuelle d'un subgraph : +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/fr/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/fr/subgraphs/developing/deploying/using-subgraph-studio.mdx index 4582f8643eb7..e1a4559b28bf 100644 --- a/website/src/pages/fr/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/fr/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Une fois que vous êtes prêt, vous pouvez déployer votre Subgraph dans Subgraph Studio. > Le déploiement d'un Subgraph à l'aide de la CLI le transfère dans le Studio, où vous pouvez le tester et mettre à jour les métadonnées. Cette action ne publie pas votre Subgraph sur le réseau décentralisé. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Utilisez la commande CLI suivante pour déployer votre Subgraph : @@ -104,6 +106,8 @@ Après avoir exécuté cette commande, la CLI demandera une étiquette de versio Après le déploiement, vous pouvez tester votre Subgraph (soit dans Subgraph Studio, soit dans votre propre application, avec l'URL de requête de déploiement), déployer une autre version, mettre à jour les métadonnées et publier sur [Graph Explorer](https://thegraph.com/explorer) lorsque vous êtes prêt. +> **Note**: The development query URL is limited to 3,000 queries per day. + Utilisez Subgraph Studio pour vérifier les journaux du tableau de bord et rechercher les erreurs éventuelles de votre Subgraph. ## Publiez votre subgraph diff --git a/website/src/pages/fr/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/fr/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 88b91fcd179c..3d936960605a 100644 --- a/website/src/pages/fr/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/fr/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -47,18 +47,18 @@ Depuis la version 0.73.0, vous pouvez également publier votre Subgraph avec [`g Vous pouvez télécharger votre Subgraph sur un nœud IPFS spécifique et personnaliser davantage votre déploiement à l'aide des flags suivants : ``` -UTILISATION +USAGE $ graph publish [SUBGRAPH-MANIFEST] [-h] [--protocol-network arbitrum-one|arbitrum-sepolia --subgraph-id ] [-i ] [--ipfs-hash ] [--webapp-url ] FLAGS - -h, --help Affiche l'aide CLI. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Charge les résultats du build sur un noeud IPFS. - --ipfs-hash= hash IPFS du manifeste du subgraph à déployer. - --protocol-network=
` चलाने पर तालिका की पूरी गणना की जाती है - यह धीमा हो सकता है, लेकिन विशिष्ट entities और कुल entities संस्करणों के अनुपात का सटीक माप प्रदान करता है। @@ -340,6 +345,4 @@ Uniswap जैसी Subgraphs के लिए, `pair` और `token` टेब #### सबग्राफ हटाना -> यह new functionality है, जो garph node 0.29.x में उपलब्ध होगी - At some point, एक Indexer किसी दिए गए Subgraph को हटाना चाह सकता है। यह आसानी से `graphman drop` के माध्यम से किया जा सकता है, जो एक deployment और उसके सभी indexed डेटा को हटा देता है। Deployment को या तो सबग्राफ नाम, एक IPFS हैश `Qm..`, या डेटाबेस namespace `sgdNNN` के रूप में निर्दिष्ट किया जा सकता है। आगे का दस्तावेज़ [यहाँ](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop) उपलब्ध है। diff --git a/website/src/pages/hi/resources/claude-mcp.mdx b/website/src/pages/hi/resources/claude-mcp.mdx new file mode 100644 index 000000000000..d9220f7d4196 --- /dev/null +++ b/website/src/pages/hi/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## आवश्यक शर्तें + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/hi/resources/tokenomics.mdx b/website/src/pages/hi/resources/tokenomics.mdx index ac420f323ab7..00ea0f5b3cef 100644 --- a/website/src/pages/hi/resources/tokenomics.mdx +++ b/website/src/pages/hi/resources/tokenomics.mdx @@ -6,7 +6,7 @@ description: The Graph Network को शक्तिशाली टोकन ## Overview -The Graph एक **decentralized protocol** है, जो **blockchain data** तक आसान पहुँच प्रदान करता है। यह **blockchain data** को उसी तरह **index** करता है, जैसे **Google** वेब को **index** करता है। अगर आपने किसी ऐसे **dapp** का उपयोग किया है जो किसी **Subgraph** से डेटा प्राप्त करता है, तो आपने संभवतः **The Graph** के साथ इंटरैक्ट किया है। आज, **Web3 ecosystem** में हजारों [लोकप्रिय dapps](https://thegraph.com/explorer) **The Graph** का उपयोग कर रहे हैं। +The Graph एक **decentralized protocol** है, जो **blockchain data** तक आसान पहुँच प्रदान करता है। यह **blockchain data** को उसी तरह **index** करता है, जैसे **Google** वेब को **index** करता है। अगर आपने किसी ऐसे **dapp** का उपयोग किया है जो किसी **Subgraph** से डेटा प्राप्त करता है, तो आपने संभवतः **The Graph** के साथ इंटरैक्ट किया है। आज, **Web3 ecosystem** में हजारों [लोकप्रिय dapps](https://thegraph.com/explorer) **The Graph** का उपयोग कर रहे हैं। ## विशिष्टताएँ @@ -36,7 +36,7 @@ The Graph ब्लॉकचेन डेटा को अधिक सुलभ ## Delegator(निष्क्रिय रूप से GRT कमाएं) -**Indexers** को **Delegators** द्वारा **GRT** डेलिगेट किया जाता है, जिससे नेटवर्क पर Subgraphs में Indexer की **stake** बढ़ती है। इसके बदले में, **Delegators** को Indexer से मिलने वाले कुल **query fees** और **indexing rewards** का एक निश्चित प्रतिशत मिलता है। हर **Indexer** स्वतंत्र रूप से तय करता है कि वह **Delegators** को कितना रिवार्ड देगा, जिससे **Indexers** के बीच **Delegators** को आकर्षित करने की प्रतिस्पर्धा बनी रहती है। अधिकांश **Indexers** सालाना **9-12%** रिटर्न ऑफर करते हैं। +**Indexers** को **Delegators** द्वारा **GRT** डेलिगेट किया जाता है, जिससे नेटवर्क पर Subgraphs में Indexer की **stake** बढ़ती है। इसके बदले में, **Delegators** को Indexer से मिलने वाले कुल **query fees** और **indexing rewards** का एक निश्चित प्रतिशत मिलता है। हर **Indexer** स्वतंत्र रूप से तय करता है कि वह **Delegators** को कितना रिवार्ड देगा, जिससे **Indexers** के बीच **Delegators** को आकर्षित करने की प्रतिस्पर्धा बनी रहती है। अधिकांश **Indexers** सालाना **9-12%** रिटर्न ऑफर करते हैं। यदि कोई Delegator 15k GRT को किसी ऐसे Indexer को डेलिगेट करता है जो 10% की पेशकश कर रहा है, तो Delegator को वार्षिक रूप से ~1,500 GRT का इनाम प्राप्त होगा। @@ -46,7 +46,7 @@ The Graph ब्लॉकचेन डेटा को अधिक सुलभ ## Curators (GRT कमाएं) -**Curators** उच्च-गुणवत्ता वाले **Subgraphs** की पहचान करते हैं और उन्हें **"curate"** करते हैं (अर्थात, उन पर **GRT signal** करते हैं) ताकि **curation shares** कमा सकें। ये **curation shares** उस **Subgraph** द्वारा उत्पन्न सभी भविष्य की **query fees** का एक निश्चित प्रतिशत सुनिश्चित करते हैं। हालाँकि कोई भी स्वतंत्र नेटवर्क प्रतिभागी **Curator** बन सकता है, आमतौर पर **Subgraph developers** अपने स्वयं के **Subgraphs** के पहले **Curators** होते हैं, क्योंकि वे सुनिश्चित करना चाहते हैं कि उनका **Subgraph indexed** हो। +**Curators** उच्च-गुणवत्ता वाले **Subgraphs** की पहचान करते हैं और उन्हें **"curate"** करते हैं (अर्थात, उन पर **GRT signal** करते हैं) ताकि **curation shares** कमा सकें। ये **curation shares** उस **Subgraph** द्वारा उत्पन्न सभी भविष्य की **query fees** का एक निश्चित प्रतिशत सुनिश्चित करते हैं। हालाँकि कोई भी स्वतंत्र नेटवर्क प्रतिभागी **Curator** बन सकता है, आमतौर पर **Subgraph developers** अपने स्वयं के **Subgraphs** के पहले **Curators** होते हैं, क्योंकि वे सुनिश्चित करना चाहते हैं कि उनका **Subgraph indexed** हो। **Subgraph developers** को सलाह दी जाती है कि वे अपने **Subgraph** को कम से कम **3,000 GRT** के साथ **curate** करें। हालांकि, यह संख्या **network activity** और **community participation** के अनुसार बदल सकती है। @@ -54,11 +54,11 @@ The Graph ब्लॉकचेन डेटा को अधिक सुलभ ## डेवलपर्स -**Developers** **Subgraphs** बनाते हैं और उन्हें **query** करके **blockchain data** प्राप्त करते हैं। चूंकि **Subgraphs** **open source** होते हैं, **developers** मौजूदा **Subgraphs** को **query** करके अपने **dapps** में **blockchain data** लोड कर सकते हैं। **Developers** द्वारा किए गए **queries** के लिए **GRT** में भुगतान किया जाता है, जो नेटवर्क प्रतिभागियों के बीच वितरित किया जाता है। +**Developers** **Subgraphs** बनाते हैं और उन्हें **query** करके **blockchain data** प्राप्त करते हैं। चूंकि **Subgraphs** **open source** होते हैं, **developers** मौजूदा **Subgraphs** को **query** करके अपने **dapps** में **blockchain data** लोड कर सकते हैं। **Developers** द्वारा किए गए **queries** के लिए **GRT** में भुगतान किया जाता है, जो नेटवर्क प्रतिभागियों के बीच वितरित किया जाता है। ### Creating a Subgraph -**Developers** **[Subgraph create](/developing/creating-a-subgraph/)** करके **blockchain** पर डेटा **index** कर सकते हैं। **Subgraphs** यह निर्देश देते हैं कि **Indexers** को कौन सा डेटा **consumers** को उपलब्ध कराना चाहिए। +**Developers** **[Subgraph create](/developing/creating-a-subgraph/)** करके **blockchain** पर डेटा **index** कर सकते हैं। **Subgraphs** यह निर्देश देते हैं कि **Indexers** को कौन सा डेटा **consumers** को उपलब्ध कराना चाहिए। जब **developers** अपना **Subgraph** बना और टेस्ट कर लेते हैं, तो वे इसे **The Graph** के **decentralized network** पर **[publish](/subgraphs/developing/publishing/publishing-a-subgraph/)** कर सकते हैं। @@ -92,9 +92,8 @@ Indexers दो तरीकों से GRT रिवार्ड्स कम **प्रारंभिक टोकन आपूर्ति** 10 बिलियन **GRT** है, और **Indexers** को **Subgraphs** पर **stake allocate** करने के लिए प्रति वर्ष **3%** नई **GRT issuance** का लक्ष्य रखा गया है। इसका मतलब है कि हर साल **Indexers** के योगदान के लिए नए टोकन जारी किए जाएंगे, जिससे कुल **GRT आपूर्ति** 3% बढ़ेगी। -The Graph में नए टोकन **issuance** को संतुलित करने के लिए कई **burning mechanisms** शामिल किए गए हैं। सालाना लगभग **1% GRT supply** विभिन्न नेटवर्क गतिविधियों के माध्यम से **burn** हो जाती है, और यह संख्या नेटवर्क की वृद्धि के साथ बढ़ रही है। ये **burning mechanisms** शामिल हैं: - **0.5% Delegation Tax**: जब कोई **Delegator** किसी **Indexer** को **GRT** डेलीगेट करता है। - -- **1% Curation Tax**: जब **Curators** किसी **Subgraph** पर **GRT signal** करते हैं। +The Graph में नए टोकन **issuance** को संतुलित करने के लिए कई **burning mechanisms** शामिल किए गए हैं। सालाना लगभग **1% GRT supply** विभिन्न नेटवर्क गतिविधियों के माध्यम से **burn** हो जाती है, और यह संख्या नेटवर्क की वृद्धि के साथ बढ़ रही है। ये **burning mechanisms** शामिल हैं: - **0.5% Delegation Tax**: जब कोई **Delegator** किसी **Indexer** को **GRT** डेलीगेट करता है। +- **1% Curation Tax**: जब **Curators** किसी **Subgraph** पर **GRT signal** करते हैं। - **1% Query Fees Burn**: जब **ब्लॉकचेन डेटा** के लिए **queries** की जाती हैं। ![कुल जले हुए GRT](/img/total-burned-grt.jpeg) @@ -103,4 +102,4 @@ The Graph में नए टोकन **issuance** को संतुलि ## प्रोटोकॉल में सुधार करना -The Graph Network निरंतर विकसित हो रहा है और प्रोटोकॉल की आर्थिक संरचना में सुधार किए जा रहे हैं ताकि सभी नेटवर्क प्रतिभागियों को सर्वोत्तम अनुभव मिल सके। The Graph Council प्रोटोकॉल परिवर्तनों की निगरानी करता है और समुदाय के सदस्यों को भाग लेने के लिए प्रोत्साहित किया जाता है। प्रोटोकॉल सुधारों में शामिल हों [The Graph Forum] (https://forum.thegraph.com/) में। + The Graph Network निरंतर विकसित हो रहा है और प्रोटोकॉल की आर्थिक संरचना में सुधार किए जा रहे हैं ताकि सभी नेटवर्क प्रतिभागियों को सर्वोत्तम अनुभव मिल सके। The Graph Council प्रोटोकॉल परिवर्तनों की निगरानी करता है और समुदाय के सदस्यों को भाग लेने के लिए प्रोत्साहित किया जाता है। प्रोटोकॉल सुधारों में शामिल हों [The Graph Forum] (https://forum.thegraph.com/) में। diff --git a/website/src/pages/hi/subgraphs/_meta-titles.json b/website/src/pages/hi/subgraphs/_meta-titles.json index 87cd473806ba..2e0336761d36 100644 --- a/website/src/pages/hi/subgraphs/_meta-titles.json +++ b/website/src/pages/hi/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "queries", "developing": "विकसित करना", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/hi/subgraphs/developing/creating/advanced.mdx b/website/src/pages/hi/subgraphs/developing/creating/advanced.mdx index 22a80fd744e2..f6540dd317c2 100644 --- a/website/src/pages/hi/subgraphs/developing/creating/advanced.mdx +++ b/website/src/pages/hi/subgraphs/developing/creating/advanced.mdx @@ -8,11 +8,11 @@ title: उन्नत Subgraph विशेषताएँ `specVersion` `0.0.4` से शुरू होकर, सबग्राफ सुविधाओं को स्पष्ट रूप से `विशेषता` अनुभाग में शीर्ष स्तर पर घोषित किया जाना चाहिए, जो उनके `camelCase` नाम का उपयोग करके किया जाता है, जैसा कि नीचे दी गई तालिका में सूचीबद्ध है: -| विशेषता | नाम | -| ------------------------------------------------- | -------------------- | -| [गैर-घातक त्रुटियाँ](#non-fatal-errors) | `गैर-घातक त्रुटियाँ` | -| [पूर्ण-पाठ खोज](#defining-fulltext-search-fields) | `पूर्ण-पाठ खोज` | -| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | +| विशेषता | नाम | +| ------------------------------------------------------ | -------------------- | +| [गैर-घातक त्रुटियाँ](#non-fatal-errors) | `गैर-घातक त्रुटियाँ` | +| [पूर्ण-पाठ खोज](#defining-fulltext-search-fields) | `पूर्ण-पाठ खोज` | +| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | instance के लिए, यदि कोई सबग्राफ **Full-Text Search** और **Non-fatal Errors** सुविधाओं का उपयोग करता है, तो मैनिफेस्ट में `विशेषता` फ़ील्ड इस प्रकार होनी चाहिए: @@ -97,7 +97,7 @@ type Stats @aggregation(intervals: ["hour", "day"], source: "Data") { ## गैर-घातक त्रुटियाँ -indexing त्रुटियाँ, जो पहले से सिंक हो चुके सबग्राफ पर होती हैं, डिफ़ॉल्ट रूप से सबग्राफ को विफल कर देंगी और सिंकिंग रोक देंगी। वैकल्पिक रूप से, सबग्राफ को इस तरह कॉन्फ़िगर किया जा सकता है कि वे त्रुटियों की उपस्थिति में भी सिंकिंग जारी रखें, उन परिवर्तनों को अनदेखा करके जो उस handler द्वारा किए गए थे जिसने त्रुटि उत्पन्न की। यह सबग्राफ लेखकों को अपने सबग्राफ को सही करने का समय देता है, जबकि नवीनतम ब्लॉक के विरुद्ध क्वेरीज़ दी जाती रहती हैं, हालांकि परिणाम उस बग के कारण असंगत हो सकते हैं जिसने त्रुटि उत्पन्न की थी। ध्यान दें कि कुछ त्रुटियाँ फिर भी हमेशा घातक होती हैं। गैर-घातक होने के लिए, त्रुटि को निर्धारक (deterministic) रूप से ज्ञात होना चाहिए। +indexing त्रुटियाँ, जो पहले से सिंक हो चुके सबग्राफ पर होती हैं, डिफ़ॉल्ट रूप से सबग्राफ को विफल कर देंगी और सिंकिंग रोक देंगी। वैकल्पिक रूप से, सबग्राफ को इस तरह कॉन्फ़िगर किया जा सकता है कि वे त्रुटियों की उपस्थिति में भी सिंकिंग जारी रखें, उन परिवर्तनों को अनदेखा करके जो उस handler द्वारा किए गए थे जिसने त्रुटि उत्पन्न की। यह सबग्राफ लेखकों को अपने सबग्राफ को सही करने का समय देता है, जबकि नवीनतम ब्लॉक के विरुद्ध क्वेरीज़ दी जाती रहती हैं, हालांकि परिणाम उस बग के कारण असंगत हो सकते हैं जिसने त्रुटि उत्पन्न की थी। ध्यान दें कि कुछ त्रुटियाँ फिर भी हमेशा घातक होती हैं। गैर-घातक होने के लिए, त्रुटि को निर्धारक (deterministic) रूप से ज्ञात होना चाहिए। > **नोट:**ग्राफ नेटवर्क अभी तक गैर-घातक त्रुटियों का समर्थन नहीं करता है, और डेवलपर्स को स्टूडियो के माध्यम से उस कार्यक्षमता का उपयोग करके सबग्राफ को नेटवर्क पर परिनियोजित नहीं करना चाहिए। @@ -343,7 +343,8 @@ export function handleTransfer(event: TransferEvent): void { आप [ DataSource context](/subgraphs/developing/creating/graph-ts/api/#entity-and-datasourcecontext) का उपयोग कर सकते हैं जब आप File Data साधन बना रहे हों ताकि अतिरिक्त जानकारी पास की जा सके जो File Data साधन handler में उपलब्ध होगी। -यदि आपके पास ऐसी entities हैं जो कई बार रिफ्रेश होती हैं, तो IPFS हैश और entity ID का उपयोग करके unique file-based entities बनाएं, और उन्हें chain-based entity में एक derived field का उपयोग करके संदर्भित करें। entities +यदि आपके पास ऐसी entities हैं जो कई बार रिफ्रेश होती हैं, तो IPFS हैश और entity ID का उपयोग करके unique file-based entities बनाएं, और उन्हें chain-based entity में एक derived field का उपयोग करके संदर्भित करें। +entities > हम ऊपर दिए गए सुझाव को बेहतर बनाने के लिए काम कर रहे हैं, इसलिए क्वेरी केवल "नवीनतम" संस्करण लौटाती हैं @@ -355,7 +356,7 @@ export function handleTransfer(event: TransferEvent): void { #### उदाहरण -[Crypto Coven सबग्राफ migration](https://github.com/azf20/cryptocoven-api/tree/file-data-sources-refactor) +[Crypto Coven सबग्राफ migration](https://github.com/azf20/cryptocoven-api/tree/file-data-sources-refactor) #### संदर्भ @@ -529,13 +530,14 @@ calls: ```yaml calls: - ERC20DecimalsToken0: ERC20[event.params.token0].decimals() + ``` ### मौजूदा सबग्राफ पर ग्राफ्टिंग > **नोट**: प्रारंभिक रूप से The Graph Network में अपग्रेड करते समय graft का उपयोग करने की अनुशंसा नहीं की जाती है। अधिक जानें [यहाँ](/subgraphs/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)। -जब कोई सबग्राफ पहली बार डिप्लॉय किया जाता है, तो यह संबंधित चेन के जेनेसिस ब्लॉक (या प्रत्येक डेटा स्रोत के साथ परिभाषित `startBlock`) से इवेंट्स को indexing करना शुरू करता है। कुछ परिस्थितियों में, मौजूदा सबग्राफ से डेटा को पुन: उपयोग करना और किसी बाद के ब्लॉक से इंडेक्सिंग शुरू करना फायदेमंद होता है। इस indexing मोड को _Grafting_ कहा जाता है। उदाहरण के लिए, विकास के दौरान, यह मैपिंग में छोटे एरर्स को जल्दी से पार करने या किसी मौजूदा सबग्राफ को फिर से चालू करने के लिए उपयोगी होता है, यदि वह फेल हो गया हो। +जब कोई सबग्राफ पहली बार डिप्लॉय किया जाता है, तो यह संबंधित चेन के जेनेसिस ब्लॉक (या प्रत्येक डेटा स्रोत के साथ परिभाषित `startBlock`) से इवेंट्स को indexing करना शुरू करता है। कुछ परिस्थितियों में, मौजूदा सबग्राफ से डेटा को पुन: उपयोग करना और किसी बाद के ब्लॉक से इंडेक्सिंग शुरू करना फायदेमंद होता है। इस indexing मोड को _Grafting_ कहा जाता है। उदाहरण के लिए, विकास के दौरान, यह मैपिंग में छोटे एरर्स को जल्दी से पार करने या किसी मौजूदा सबग्राफ को फिर से चालू करने के लिए उपयोगी होता है, यदि वह फेल हो गया हो। एक सबग्राफ को एक बेस सबग्राफ पर graft किया जाता है जब `subgraph.yaml` में सबग्राफ manifest में शीर्ष स्तर पर एक `graft` ब्लॉक होता है। @@ -546,7 +548,7 @@ graft: block: 7345624 # Block number ``` -जब कोई सबग्राफ , जिसकी मैनिफेस्ट में `graft` ब्लॉक शामिल होता है, डिप्लॉय किया जाता है, तो ग्राफ-नोड दिए गए `block` तक base सबग्राफ के डेटा को कॉपी करेगा और फिर उस ब्लॉक से नए सबग्राफ को इंडेक्स करना जारी रखेगा। base सबग्राफ को लक्षित ग्राफ-नोड इंस्टेंस पर मौजूद होना चाहिए और कम से कम दिए गए ब्लॉक तक इंडेक्स किया जाना चाहिए। इस प्रतिबंध के कारण, ग्राफ्टिंग का उपयोग केवल डेवलपमेंट के दौरान या किसी आपात स्थिति में एक समान गैर-ग्राफ्टेड सबग्राफ को जल्दी से तैयार करने के लिए किया जाना चाहिए। +जब कोई सबग्राफ , जिसकी मैनिफेस्ट में `graft` ब्लॉक शामिल होता है, डिप्लॉय किया जाता है, तो ग्राफ-नोड दिए गए `block` तक base सबग्राफ के डेटा को कॉपी करेगा और फिर उस ब्लॉक से नए सबग्राफ को इंडेक्स करना जारी रखेगा। base सबग्राफ को लक्षित ग्राफ-नोड इंस्टेंस पर मौजूद होना चाहिए और कम से कम दिए गए ब्लॉक तक इंडेक्स किया जाना चाहिए। इस प्रतिबंध के कारण, ग्राफ्टिंग का उपयोग केवल डेवलपमेंट के दौरान या किसी आपात स्थिति में एक समान गैर-ग्राफ्टेड सबग्राफ को जल्दी से तैयार करने के लिए किया जाना चाहिए। ग्राफ्टिंग मूल डेटा के बजाय प्रतिलिपियाँ बनाता है, इसलिए यह शुरू से इंडेक्सिंग करने की तुलना में सबग्राफ को वांछित ब्लॉक तक पहुँचाने में कहीं अधिक तेज़ होता है, हालाँकि बहुत बड़े सबग्राफ के लिए प्रारंभिक डेटा कॉपी करने में अभी भी कई घंटे लग सकते हैं। जब तक ग्राफ्ट किया गया सबग्राफ प्रारंभिक रूप से स्थापित हो रहा होता है, तब तक The ग्राफ नोड उन entity प्रकारों के बारे में जानकारी लॉग करेगा जिन्हें पहले ही कॉपी किया जा चुका है। diff --git a/website/src/pages/hi/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/hi/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/hi/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/hi/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/hi/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/hi/subgraphs/developing/creating/graph-ts/api.mdx index 1bed291fc89f..e1cb224c81ce 100644 --- a/website/src/pages/hi/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/hi/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ Learn what built-in APIs can be used when writing Subgraph mappings. There are t The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -595,11 +595,7 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [ - value.toString(), - OtherValue.toString(), - 'पहले से ही एक स्ट्रिंग', -]) +log.info ('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [value.toString (), OtherValue.toString (), 'पहले से ही एक स्ट्रिंग']) ``` #### एक या अधिक मान लॉग करना diff --git a/website/src/pages/hi/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/hi/subgraphs/developing/creating/starting-your-subgraph.mdx index 180a343470b1..4931e6b1fd34 100644 --- a/website/src/pages/hi/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/hi/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Release notes | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Release notes | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/hi/subgraphs/developing/creating/unit-testing-framework.mdx b/website/src/pages/hi/subgraphs/developing/creating/unit-testing-framework.mdx index 64ec49930c33..f1f1aacab6ff 100644 --- a/website/src/pages/hi/subgraphs/developing/creating/unit-testing-framework.mdx +++ b/website/src/pages/hi/subgraphs/developing/creating/unit-testing-framework.mdx @@ -35,7 +35,7 @@ yarn add --dev matchstick-as brew install postgresql ``` -यहां तक कि नवीनतम libpq.5.lib\_ का एक symlink बनाएं। आपको पहले यह dir बनाने की आवश्यकता हो सकती है: `/usr/local/opt/postgresql/lib/` +यहां तक कि नवीनतम libpq.5.lib_ का एक symlink बनाएं। आपको पहले यह dir बनाने की आवश्यकता हो सकती है: `/usr/local/opt/postgresql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib diff --git a/website/src/pages/hi/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/hi/subgraphs/developing/deploying/multiple-networks.mdx index d10ef9160dc6..6a4efc49ef2e 100644 --- a/website/src/pages/hi/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/hi/subgraphs/developing/deploying/multiple-networks.mdx @@ -213,7 +213,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/hi/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/hi/subgraphs/developing/deploying/using-subgraph-studio.mdx index eab335f08623..e4a38c427323 100644 --- a/website/src/pages/hi/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/hi/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -25,7 +25,7 @@ In Subgraph Studio,आप निम Deploy करने से पहले, आपको The Graph CLI इंस्टॉल करना होगा। -आपको The Graph CLI का उपयोग करने के लिए Node.js(https://nodejs.org/) और आपकी पसंद का पैकेज मैनेजर (npm, yarn या pnpm) स्थापित होना चाहिए। सबसे हालिया (https://github.com/graphprotocol/graph-tooling/releases?q=%40graphprotocol%2Fgraph-cli&expanded=true) CLI संस्करण की जांच करें। +आपको The Graph CLI का उपयोग करने के लिए Node.js(https://nodejs.org/) और आपकी पसंद का पैकेज मैनेजर (npm, yarn या pnpm) स्थापित होना चाहिए। सबसे हालिया (https://github.com/graphprotocol/graph-tooling/releases?q=%40graphprotocol%2Fgraph-cli&expanded=true) CLI संस्करण की जांच करें। ### इंस्टॉल करें 'yarn' के साथ @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ graph deploy After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## अपने Subgraph को प्रकाशित करें diff --git a/website/src/pages/hi/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/hi/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 4de4472caf4c..ef1a8060175f 100644 --- a/website/src/pages/hi/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/hi/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Si tratta di una nuova funzionalità, che sarà disponibile in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/it/resources/claude-mcp.mdx b/website/src/pages/it/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/it/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/it/subgraphs/_meta-titles.json b/website/src/pages/it/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/it/subgraphs/_meta-titles.json +++ b/website/src/pages/it/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/it/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/it/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/it/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/it/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/it/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/it/subgraphs/developing/creating/graph-ts/api.mdx index 06fd431e7048..fb87d521d968 100644 --- a/website/src/pages/it/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/it/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ La libreria `@graphprotocol/graph-ts` fornisce le seguenti API: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Versione | Note di rilascio | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
Aggiunto il campo `receipt` all'oggetto Ethereum Event | -| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | +| Versione | Note di rilascio | +| :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
Aggiunto il campo `receipt` all'oggetto Ethereum Event | +| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | ### Tipi integrati @@ -770,44 +770,44 @@ Quando il tipo di un valore è certo, può essere convertito in un [tipo incorpo ### Riferimento alle conversioni di tipo -| Fonte(i) | Destinazione | Funzione di conversione | -| -------------------- | -------------------- | --------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(i) | Destinazione | Funzione di conversione | +| -------------------- | --------------------- | -------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadati della Data Source diff --git a/website/src/pages/it/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/it/subgraphs/developing/creating/starting-your-subgraph.mdx index 49090d6b963f..5b0ac052a82d 100644 --- a/website/src/pages/it/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/it/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Versione | Note di rilascio | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Versione | Note di rilascio | +| :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/it/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/it/subgraphs/developing/deploying/multiple-networks.mdx index f8b9f74c6479..14056f78d173 100644 --- a/website/src/pages/it/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/it/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/it/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/it/subgraphs/developing/deploying/using-subgraph-studio.mdx index 3a07d7d50b24..f1e69207ee72 100644 --- a/website/src/pages/it/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/it/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/it/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/it/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 1672a6619d13..985a5bd7d9d7 100644 --- a/website/src/pages/it/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/it/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> これは新しい機能で、Graph Node 0.29.xで利用可能になる予定です。 - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/ja/resources/claude-mcp.mdx b/website/src/pages/ja/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/ja/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/ja/subgraphs/_meta-titles.json b/website/src/pages/ja/subgraphs/_meta-titles.json index 5c6121aa7d88..cedc24a8e1b5 100644 --- a/website/src/pages/ja/subgraphs/_meta-titles.json +++ b/website/src/pages/ja/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "クエリ", "developing": "開発", "guides": "How-to Guides", - "best-practices": "ベストプラクティス" + "best-practices": "ベストプラクティス", + "mcp": "MCP" } diff --git a/website/src/pages/ja/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/ja/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/ja/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/ja/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/ja/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/ja/subgraphs/developing/creating/graph-ts/api.mdx index 94df906daad7..b9e5cace8281 100644 --- a/website/src/pages/ja/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/ja/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ Since language mappings are written in AssemblyScript, it is useful to review th The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| バージョン | リリースノート | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
Ethereum Event オブジェクトに `receipt` フィールドを追加。 | -| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | +| バージョン | リリースノート | +| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
Ethereum Event オブジェクトに `receipt` フィールドを追加。 | +| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | +| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | ### 組み込み型 @@ -286,7 +286,7 @@ The store API facilitates the retrieval of entities that were created or updated - For some Subgraphs, these missed lookups can contribute significantly to the indexing time. ```typescript -let id = event.transaction.hash // または ID が構築される方法 +let id =event.transaction.hash // または ID が構築される方法 let transfer = Transfer.loadInBlock(id) if (transfer == null) { transfer = 新しい転送(id) @@ -770,44 +770,44 @@ if (value.kind == JSONValueKind.BOOL) { ### タイプ 変換参照 -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | Bigint.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromString(s) | -| String | BigInt | BigDecimal.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | -------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | Bigint.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromString(s) | +| String | BigInt | BigDecimal.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### データソースのメタデータ diff --git a/website/src/pages/ja/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/ja/subgraphs/developing/creating/starting-your-subgraph.mdx index 3fd648b44813..3c40e48ef42d 100644 --- a/website/src/pages/ja/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/ja/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| バージョン | リリースノート | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | +| バージョン | リリースノート | +| :---: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | | 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/ja/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/ja/subgraphs/developing/deploying/multiple-networks.mdx index a43e7a32c7b8..271a81b74cfa 100644 --- a/website/src/pages/ja/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/ja/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/ja/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/ja/subgraphs/developing/deploying/using-subgraph-studio.mdx index 4e8503e208e4..3b4a1ecf9ba7 100644 --- a/website/src/pages/ja/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/ja/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/ja/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/ja/subgraphs/developing/publishing/publishing-a-subgraph.mdx index c26672ec6b84..4efa2628552b 100644 --- a/website/src/pages/ja/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/ja/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/ko/resources/claude-mcp.mdx b/website/src/pages/ko/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/ko/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/ko/subgraphs/_meta-titles.json b/website/src/pages/ko/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/ko/subgraphs/_meta-titles.json +++ b/website/src/pages/ko/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/ko/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/ko/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/ko/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/ko/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/ko/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/ko/subgraphs/developing/creating/graph-ts/api.mdx index 5be2530c4d6b..2e256ae18190 100644 --- a/website/src/pages/ko/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/ko/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types diff --git a/website/src/pages/ko/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/ko/subgraphs/developing/creating/starting-your-subgraph.mdx index 180a343470b1..4931e6b1fd34 100644 --- a/website/src/pages/ko/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/ko/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Release notes | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Release notes | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/ko/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/ko/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/ko/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/ko/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/ko/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/ko/subgraphs/developing/deploying/using-subgraph-studio.mdx index 77d10212c770..d44f9b375203 100644 --- a/website/src/pages/ko/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/ko/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/ko/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/ko/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/ko/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/ko/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/mr/resources/claude-mcp.mdx b/website/src/pages/mr/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/mr/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/mr/subgraphs/_meta-titles.json b/website/src/pages/mr/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/mr/subgraphs/_meta-titles.json +++ b/website/src/pages/mr/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/mr/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/mr/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/mr/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/mr/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/mr/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/mr/subgraphs/developing/creating/graph-ts/api.mdx index c84987c66e17..c4c2e4f17471 100644 --- a/website/src/pages/mr/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/mr/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| आवृत्ती | रिलीझ नोट्स | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| आवृत्ती | रिलीझ नोट्स | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंगभूत प्रकार diff --git a/website/src/pages/mr/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/mr/subgraphs/developing/creating/starting-your-subgraph.mdx index daed9ec13c64..8b40bdfde4fc 100644 --- a/website/src/pages/mr/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/mr/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| आवृत्ती | रिलीझ नोट्स | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| आवृत्ती | रिलीझ नोट्स | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/mr/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/mr/subgraphs/developing/deploying/multiple-networks.mdx index 3e34f743a6c0..6fc6fe500de3 100644 --- a/website/src/pages/mr/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/mr/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/mr/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/mr/subgraphs/developing/deploying/using-subgraph-studio.mdx index 2319974d45ed..e07a0f3d1531 100644 --- a/website/src/pages/mr/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/mr/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/mr/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/mr/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 78b641e5ae0a..5c0177c85d87 100644 --- a/website/src/pages/mr/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/mr/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/nl/resources/claude-mcp.mdx b/website/src/pages/nl/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/nl/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/nl/subgraphs/_meta-titles.json b/website/src/pages/nl/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/nl/subgraphs/_meta-titles.json +++ b/website/src/pages/nl/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/nl/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/nl/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/nl/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/nl/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/nl/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/nl/subgraphs/developing/creating/graph-ts/api.mdx index 5be2530c4d6b..2e256ae18190 100644 --- a/website/src/pages/nl/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/nl/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types diff --git a/website/src/pages/nl/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/nl/subgraphs/developing/creating/starting-your-subgraph.mdx index 180a343470b1..4931e6b1fd34 100644 --- a/website/src/pages/nl/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/nl/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Release notes | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Release notes | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/nl/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/nl/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/nl/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/nl/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/nl/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/nl/subgraphs/developing/deploying/using-subgraph-studio.mdx index 370e428284cc..c64fab1db15e 100644 --- a/website/src/pages/nl/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/nl/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/nl/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/nl/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/nl/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/nl/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/pl/resources/claude-mcp.mdx b/website/src/pages/pl/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/pl/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/pl/subgraphs/_meta-titles.json b/website/src/pages/pl/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/pl/subgraphs/_meta-titles.json +++ b/website/src/pages/pl/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/pl/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/pl/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/pl/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/pl/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/pl/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/pl/subgraphs/developing/creating/graph-ts/api.mdx index 5be2530c4d6b..2e256ae18190 100644 --- a/website/src/pages/pl/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/pl/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types diff --git a/website/src/pages/pl/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/pl/subgraphs/developing/creating/starting-your-subgraph.mdx index 180a343470b1..4931e6b1fd34 100644 --- a/website/src/pages/pl/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/pl/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Release notes | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Release notes | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/pl/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/pl/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/pl/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/pl/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/pl/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/pl/subgraphs/developing/deploying/using-subgraph-studio.mdx index c21ff6dc2358..cd107113c9fd 100644 --- a/website/src/pages/pl/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/pl/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/pl/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/pl/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/pl/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/pl/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` fará uma contagem completa da tábua - que pode ser lenta, mas dá uma medida precisa da proporção entre entidades distintas e total de versões. @@ -340,6 +345,4 @@ Para subgraphs parecidos com o Uniswap, as tábuas `pair` e `token` são ótimas #### Como remover subgraphs -> Esta é uma funcionalidade nova, que estará disponível no Graph Node 0.29.x - Em certo ponto, o indexador pode querer remover um subgraph. É só usar o `graphman drop`, que apaga uma implantação e todos os seus dados indexados. A implantação pode ser especificada como o nome de um subgraph, um hash IPFS `Qm..`, ou o namespace de banco de dados `sgdNNN`. Mais documentos sobre o processo [aqui](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/pt/resources/claude-mcp.mdx b/website/src/pages/pt/resources/claude-mcp.mdx new file mode 100644 index 000000000000..a42b0486b193 --- /dev/null +++ b/website/src/pages/pt/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Pré-requisitos + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/pt/subgraphs/_meta-titles.json b/website/src/pages/pt/subgraphs/_meta-titles.json index a72543795a1d..5057a939741b 100644 --- a/website/src/pages/pt/subgraphs/_meta-titles.json +++ b/website/src/pages/pt/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Queries", "developing": "Programação", "guides": "How-to Guides", - "best-practices": "Boas práticas" + "best-practices": "Boas práticas", + "mcp": "MCP" } diff --git a/website/src/pages/pt/subgraphs/best-practices/timeseries.mdx b/website/src/pages/pt/subgraphs/best-practices/timeseries.mdx index b0a9925207eb..bb25b602d8dd 100644 --- a/website/src/pages/pt/subgraphs/best-practices/timeseries.mdx +++ b/website/src/pages/pt/subgraphs/best-practices/timeseries.mdx @@ -1,5 +1,5 @@ --- -title: 'Melhores Práticas para um Subgraph #5 — Simplifique e Otimize com Séries Temporais e Agregações' +title: "Melhores Práticas para um Subgraph #5 — Simplifique e Otimize com Séries Temporais e Agregações" sidebarTitle: Séries de Tempo e Agregações --- diff --git a/website/src/pages/pt/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/pt/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/pt/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/pt/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/pt/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/pt/subgraphs/developing/creating/graph-ts/api.mdx index ee20c583603e..986540229abe 100644 --- a/website/src/pages/pt/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/pt/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ A biblioteca `@graphprotocol/graph-ts` fornece as seguintes APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Versão | Notas de atualização | -| :-: | --- | -| 0.0.9 | Adiciona novas funções de host [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adiciona validação para existência de campos no schema ao salvar uma entidade. | -| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
Campo `receipt` adicionado ao objeto Ethereum Event | -| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
`baseFeePerGas` adicionado ao objeto Ethereum Block | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | -| 0.0.3 | Campo `from` adicionado ao objeto de chamada no Ethereum
`Callethereum.call.address` renomeado para `ethereum.call.to` | -| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | +| Versão | Notas de atualização | +| :----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adiciona novas funções de host [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adiciona validação para existência de campos no schema ao salvar uma entidade. | +| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
Campo `receipt` adicionado ao objeto Ethereum Event | +| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
`baseFeePerGas` adicionado ao objeto Ethereum Block | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | +| 0.0.3 | Campo `from` adicionado ao objeto de chamada no Ethereum
`Callethereum.call.address` renomeado para `ethereum.call.to` | +| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | ### Tipos Embutidos @@ -166,7 +166,8 @@ _Matemática_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -O `TypedMap` pode servir para armazenar pares de chave e valor (key e value ). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +O `TypedMap` pode servir para armazenar pares de chave e valor (key e value +). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). A classe `TypedMap` tem a seguinte API: @@ -770,44 +771,44 @@ Quando o tipo de um valor é confirmado, ele pode ser convertido num [tipo embut ### Referência de Conversões de Tipos -| Fonte(s) | Destino | Função de conversão | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | nenhum | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | nenhum | -| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | nenhum | -| int32 | i32 | nenhum | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | nenhum | -| int64 - int256 | BigInt | nenhum | -| uint32 - uint256 | BigInt | nenhum | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(s) | Destino | Função de conversão | +| ------------------------ | -------------------- | ------------------------------ | +| Address | Bytes | nenhum | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | nenhum | +| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | nenhum | +| int32 | i32 | nenhum | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | nenhum | +| int64 - int256 | BigInt | nenhum | +| uint32 - uint256 | BigInt | nenhum | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadados de Fontes de Dados diff --git a/website/src/pages/pt/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/pt/subgraphs/developing/creating/starting-your-subgraph.mdx index e80ca1803b20..2d834dedec0b 100644 --- a/website/src/pages/pt/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/pt/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore mais [recursos para APIs](/subgraphs/developing/creating/graph-ts/README/) e realize testes locais com [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Versão | Notas de atualização | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Versão | Notas de atualização | +| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/pt/subgraphs/developing/creating/unit-testing-framework.mdx b/website/src/pages/pt/subgraphs/developing/creating/unit-testing-framework.mdx index c1676c2773d7..a629d088a34c 100644 --- a/website/src/pages/pt/subgraphs/developing/creating/unit-testing-framework.mdx +++ b/website/src/pages/pt/subgraphs/developing/creating/unit-testing-framework.mdx @@ -1031,7 +1031,7 @@ describe('loadInBlock', () => { assert.stringEquals('gravatarId0', retrievedGravatar!.get('id')!.toString()) }) - test('Retorna null ao chamar entity.loadInBlock() se uma entidade não existir no bloco atual', () => { + test("Retorna null ao chamar entity.loadInBlock() se uma entidade não existir no bloco atual", () => { let retrievedGravatar = Gravatar.loadInBlock('IDoNotExist') assert.assertNull(retrievedGravatar) }) @@ -1376,29 +1376,19 @@ A saída do log inclui a duração do teste. Veja um exemplo: ## Erros comuns do compilador -> -> Critical: Could not create WasmInstance from valid module with context: unknown import: -> wasi_snapshot_preview1::fd_write has not been defined -> +> Critical: Could not create WasmInstance from valid module with context: unknown import: wasi_snapshot_preview1::fd_write has not been defined Isso significa que você usou `console.log` no seu código, que não é apoiado pelo AssemblyScript. Por favor, considere usar a [API de registo](/subgraphs/developing/creating/graph-ts/api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. > -> -> return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, -> defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, -> defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); > > in ~lib/matchstick-as/assembly/defaults.ts(18,12) > > ERROR TS2554: Expected ? arguments, but got ?. > -> -> return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, -> defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); > > in ~lib/matchstick-as/assembly/defaults.ts(24,12) diff --git a/website/src/pages/pt/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/pt/subgraphs/developing/deploying/multiple-networks.mdx index 1a1aca2c7b9e..ee4731e3ff4a 100644 --- a/website/src/pages/pt/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/pt/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/pt/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/pt/subgraphs/developing/deploying/using-subgraph-studio.mdx index 5a8e4fb9f905..5ba582a0ab0c 100644 --- a/website/src/pages/pt/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/pt/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ Após executar este comando, a CLI solicitará um número de versão. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Edite o Seu Subgraph diff --git a/website/src/pages/pt/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/pt/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 1d25ded18a61..0d14ba96dc81 100644 --- a/website/src/pages/pt/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/pt/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -52,13 +52,13 @@ USAGE ] FLAGS - -h, --help Mostra ajuda da CLI. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Envia resultados da build a um node IPFS. - --ipfs-hash= Hash IPFS do manifest do subgraph a ser implantado. - --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/ro/resources/claude-mcp.mdx b/website/src/pages/ro/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/ro/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/ro/subgraphs/_meta-titles.json b/website/src/pages/ro/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/ro/subgraphs/_meta-titles.json +++ b/website/src/pages/ro/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/ro/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/ro/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/ro/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/ro/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/ro/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/ro/subgraphs/developing/creating/graph-ts/api.mdx index 5be2530c4d6b..2e256ae18190 100644 --- a/website/src/pages/ro/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/ro/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types diff --git a/website/src/pages/ro/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/ro/subgraphs/developing/creating/starting-your-subgraph.mdx index 180a343470b1..4931e6b1fd34 100644 --- a/website/src/pages/ro/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/ro/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Release notes | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Release notes | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/ro/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/ro/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/ro/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/ro/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/ro/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/ro/subgraphs/developing/deploying/using-subgraph-studio.mdx index 77d10212c770..d44f9b375203 100644 --- a/website/src/pages/ro/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/ro/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/ro/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/ro/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/ro/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/ro/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` произведёт полный расчет таблицы. Этот процесс может быть медленным, но обеспечит точную степень соотношения отдельных объектов к общему количеству версий объекта. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Это новый функционал, который будет доступен в Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/ru/resources/claude-mcp.mdx b/website/src/pages/ru/resources/claude-mcp.mdx new file mode 100644 index 000000000000..a0a194f22a79 --- /dev/null +++ b/website/src/pages/ru/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Предварительные требования + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/ru/subgraphs/_meta-titles.json b/website/src/pages/ru/subgraphs/_meta-titles.json index 935e730c6eb3..59c5c3d6db97 100644 --- a/website/src/pages/ru/subgraphs/_meta-titles.json +++ b/website/src/pages/ru/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Запрос", "developing": "Разработка", "guides": "How-to Guides", - "best-practices": "Лучшие практики" + "best-practices": "Лучшие практики", + "mcp": "MCP" } diff --git a/website/src/pages/ru/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/ru/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/ru/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/ru/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/ru/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/ru/subgraphs/developing/creating/graph-ts/api.mdx index 4d3c6ff563f5..40ba29383852 100644 --- a/website/src/pages/ru/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/ru/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ Learn what built-in APIs can be used when writing Subgraph mappings. There are t The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Версия | Примечания к релизу | -| :-: | --- | -| 0.0.9 | Добавлены новые функции хоста [`eth_get_balance`](#balance-of-an-address) и [`hasCode`](#check-if-an-address-a-contract-or-eoa) | -| 0.0.8 | Добавлена проверка наличия полей в схеме при сохранении объекта. | -| 0.0.7 | К типам Ethereum добавлены классы `TransactionReceipt` и `Log`
К объекту Ethereum Event добавлено поле `receipt` | -| 0.0.6 | В объект Ethereum Transaction добавлено поле `nonce`
В объект Ethereum Block добавлено поле `baseFeePerGas` | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | В объект Ethereum SmartContractCall добавлено поле `functionSignature` | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | В объект Ethereum Transaction добавлено поле `input` | +| Версия | Примечания к релизу | +| :----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Добавлены новые функции хоста [`eth_get_balance`](#balance-of-an-address) и [`hasCode`](#check-if-an-address-a-contract-or-eoa) | +| 0.0.8 | Добавлена проверка наличия полей в схеме при сохранении объекта. | +| 0.0.7 | К типам Ethereum добавлены классы `TransactionReceipt` и `Log`
К объекту Ethereum Event добавлено поле `receipt` | +| 0.0.6 | В объект Ethereum Transaction добавлено поле `nonce`
В объект Ethereum Block добавлено поле `baseFeePerGas` | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | В объект Ethereum SmartContractCall добавлено поле `functionSignature` | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | В объект Ethereum Transaction добавлено поле `input` | ### Встроенные типы @@ -233,7 +233,7 @@ Entities written to the store map one-to-one to the `@entity` types defined in t // Импорт класса событий Transfer, сгенерированного из ERC20 ABI import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' -// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL +// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL import { Transfer } from '../generated/schema' событие // Обработчик события передачи @@ -269,6 +269,7 @@ if (transfer == null) { transfer = new Transfer(id) } + // Используйте объект Transfer, как и раньше ``` @@ -292,6 +293,7 @@ if (transfer == null) { transfer = new Transfer(id) } + // Используйте объект Transfer, как и раньше ``` @@ -695,8 +697,8 @@ let data = ipfs.cat(path) import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { - // Смотрите документацию по JsonValue для получения подробной информации о работе - // со значениями JSON +// Смотрите документацию по JsonValue для получения подробной информации о работе +// со значениями JSON let obj = value.toObject() let id = obj.get('id') let title = obj.get('title') @@ -705,7 +707,7 @@ export function processItem(value: JSONValue, userData: Value): void { return } - // Обратные вызовы также могут создавать объекты +// Обратные вызовы также могут создавать объекты let newItem = new Item(id) newItem.title = title.toString() newitem.parent = userData.toString() // Установите для родителя значение "parentId" @@ -770,44 +772,44 @@ if (value.kind == JSONValueKind.BOOL) { ### Справка по преобразованию типов -| Источник(и) | Место назначения | Функция преобразования | -| -------------------- | -------------------- | ----------------------------- | -| Address | Bytes | отсутствует | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | отсутствует | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | отсутствует | -| int32 | i32 | отсутствует | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | отсутствует | -| int64 - int256 | BigInt | отсутствует | -| uint32 - uint256 | BigInt | отсутствует | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toU64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Источник(и) | Место назначения | Функция преобразования | +| ---------------------- | ------------------------- | ----------------------------------- | +| Address | Bytes | отсутствует | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | отсутствует | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | отсутствует | +| int32 | i32 | отсутствует | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | отсутствует | +| int64 - int256 | BigInt | отсутствует | +| uint32 - uint256 | BigInt | отсутствует | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toU64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Метаданные источника данных diff --git a/website/src/pages/ru/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/ru/subgraphs/developing/creating/starting-your-subgraph.mdx index 0103ec85f145..60fcbd1a8dd9 100644 --- a/website/src/pages/ru/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/ru/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Версия | Примечания к релизу | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Версия | Примечания к релизу | +| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/ru/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/ru/subgraphs/developing/deploying/multiple-networks.mdx index 4f15c642b820..d14ae3c8bc1a 100644 --- a/website/src/pages/ru/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/ru/subgraphs/developing/deploying/multiple-networks.mdx @@ -211,7 +211,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/ru/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/ru/subgraphs/developing/deploying/using-subgraph-studio.mdx index 3ff9c8594763..9e6a7496d87c 100644 --- a/website/src/pages/ru/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/ru/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ graph deploy After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Публикация Вашего субграфа diff --git a/website/src/pages/ru/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/ru/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 8838c90b6889..e207c46cc418 100644 --- a/website/src/pages/ru/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/ru/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Detta är ny funktionalitet, som kommer att vara tillgänglig i Graf Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/sv/resources/claude-mcp.mdx b/website/src/pages/sv/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/sv/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/sv/subgraphs/_meta-titles.json b/website/src/pages/sv/subgraphs/_meta-titles.json index 79dc0c23f596..bb0d896e0625 100644 --- a/website/src/pages/sv/subgraphs/_meta-titles.json +++ b/website/src/pages/sv/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Bästa praxis" + "best-practices": "Bästa praxis", + "mcp": "MCP" } diff --git a/website/src/pages/sv/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/sv/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/sv/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/sv/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/sv/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/sv/subgraphs/developing/creating/graph-ts/api.mdx index afc7cbab6a60..d001175da07e 100644 --- a/website/src/pages/sv/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/sv/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Versionsanteckningar | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Versionsanteckningar | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Inbyggda typer @@ -163,7 +163,7 @@ _Math_ #### TypedMap ```typescript -import { TypedMap } from '@graphprotocol/graph-ts' +import { TypedMap } from "@graphprotocol/graph-ts"; ``` `TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). @@ -179,7 +179,7 @@ The `TypedMap` class has the following API: #### Bytes ```typescript -import { Bytes } from '@graphprotocol/graph-ts' +import { Bytes } from "@graphprotocol/graph-ts"; ``` `Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. @@ -205,7 +205,7 @@ _Operators_ #### Address ```typescript -import { Address } from '@graphprotocol/graph-ts' +import { Address } from "@graphprotocol/graph-ts"; ``` `Address` extends `Bytes` to represent Ethereum `address` values. @@ -218,7 +218,7 @@ It adds the following method on top of the `Bytes` API: ### Store API ```typescript -import { store } from '@graphprotocol/graph-ts' +import { store } from "@graphprotocol/graph-ts"; ``` The `store` API allows to load, save and remove entities from and to the Graph Node store. @@ -231,24 +231,24 @@ Följande är ett vanligt mönster för att skapa entiteter från Ethereum-händ ```typescript // Importera händelseklassen Transfer som genererats från ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' +import { Transfer as TransferEvent } from "../generated/ERC20/ERC20"; // Importera entitetstypen Transfer som genererats från GraphQL-schemat -import { Transfer } from '../generated/schema' +import { Transfer } from "../generated/schema"; // Händelsehanterare för överföring export function handleTransfer(event: TransferEvent): void { // Skapa en Transfer-entitet, med transaktionshash som enhets-ID - let id = event.transaction.hash - let transfer = new Transfer(id) + let id = event.transaction.hash; + let transfer = new Transfer(id); // Ange egenskaper för entiteten med hjälp av händelseparametrarna - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount + transfer.from = event.params.from; + transfer.to = event.params.to; + transfer.amount = event.params.amount; // Spara entiteten till lagret - transfer.save() + transfer.save(); } ``` @@ -263,10 +263,10 @@ Each entity must have a unique ID to avoid collisions with other entities. It is Om en entitet redan finns kan den laddas från lagret med följande: ```typescript -let id = event.transaction.hash // eller hur ID konstrueras -let transfer = Transfer.load(id) +let id = event.transaction.hash; // eller hur ID konstrueras +let transfer = Transfer.load(id); if (transfer == null) { - transfer = new Transfer(id) + transfer = new Transfer(id); } // Använd överföringsenheten som tidigare @@ -286,10 +286,10 @@ The store API facilitates the retrieval of entities that were created or updated - For some Subgraphs, these missed lookups can contribute significantly to the indexing time. ```typescript -let id = event.transaction.hash // eller hur ID konstrueras -let transfer = Transfer.loadInBlock(id) +let id = event.transaction.hash; // eller hur ID konstrueras +let transfer = Transfer.loadInBlock(id); if (transfer == null) { - transfer = new Transfer(id) + transfer = new Transfer(id); } // Använd överföringsenheten som tidigare @@ -343,7 +343,7 @@ transfer.amount = ... Det är också möjligt att avaktivera egenskaper med en av följande två instruktioner: ```typescript -transfer.from.unset() +transfer.from.unset(); transfer.from = null ``` @@ -353,14 +353,14 @@ Updating array properties is a little more involved, as the getting an array fro ```typescript // Detta kommer inte att fungera -entity.numbers.push(BigInt.fromI32(1)) -entity.save() +entity.numbers.push(BigInt.fromI32(1)); +entity.save(); // Detta kommer att fungera -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() +let numbers = entity.numbers; +numbers.push(BigInt.fromI32(1)); +entity.numbers = numbers; +entity.save(); ``` #### Ta bort entiteter från lagret @@ -398,12 +398,12 @@ type Transfer @entity { and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: ```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() +let id = event.transaction.hash; +let transfer = new Transfer(id); +transfer.from = event.params.from; +transfer.to = event.params.to; +transfer.amount = event.params.amount; +transfer.save(); ``` #### Händelser och Block/Transaktionsdata @@ -489,16 +489,19 @@ En vanlig mönster är att komma åt kontraktet från vilket en händelse härst ```typescript // Importera den genererade kontraktsklassen och den genererade klassen för överföringshändelser -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' +import { + ERC20Contract, + Transfer as TransferEvent, +} from "../generated/ERC20Contract/ERC20Contract"; // Importera den genererade entitetsklassen -import { Transfer } from '../generated/schema' +import { Transfer } from "../generated/schema"; export function handleTransfer(event: TransferEvent) { // Bind kontraktet till den adress som skickade händelsen - let contract = ERC20Contract.bind(event.address) + let contract = ERC20Contract.bind(event.address); // Åtkomst till tillståndsvariabler och funktioner genom att anropa dem - let erc20Symbol = contract.symbol() + let erc20Symbol = contract.symbol(); } ``` @@ -515,12 +518,12 @@ If the read-only methods of your contract may revert, then you should handle tha - For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: ```typescript -let gravitera = gravitera.bind(event.address) -let callResult = gravitera_gravatarToOwner(gravatar) +let gravitera = gravitera.bind(event.address); +let callResult = gravitera_gravatarToOwner(gravatar); if (callResult.reverted) { - log.info('getGravatar reverted', []) + log.info("getGravatar reverted", []); } else { - let owner = callResult.value + let owner = callResult.value; } ``` @@ -579,7 +582,7 @@ let isContract = ethereum.hasCode(eoa).inner // returns false ### API för loggning ```typescript -import { log } from '@graphprotocol/graph-ts' +import { log } from "@graphprotocol/graph-ts"; ``` The `log` API allows Subgraphs to log information to the Graph Node standard output as well as Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. @@ -595,7 +598,11 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) +log.info("Message to be displayed: {}, {}, {}", [ + value.toString(), + anotherValue.toString(), + "already a string", +]); ``` #### Loggning av ett eller flera värden @@ -618,11 +625,11 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas endast det första värdet i argument arrayen, trots att arrayen innehåller tre värden. ```typescript -let myArray = ['A', 'B', 'C'] +let myArray = ["A", "B", "C"]; export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt värde är: A" (Även om tre värden skickas till `log.info`) - log.info('Mitt värde är: {}', myArray) + log.info("Mitt värde är: {}", myArray); } ``` @@ -631,11 +638,14 @@ export function handleSomeEvent(event: SomeEvent): void { Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. ```typescript -let myArray = ['A', 'B', 'C'] +let myArray = ["A", "B", "C"]; export function handleSomeEvent(event: SomeEvent): void { // Visar: "Mitt första värde är: A, andra värdet är: B, tredje värdet är: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) + log.info( + "My first value is: {}, second value is: {}, third value is: {}", + myArray + ); } ``` @@ -646,7 +656,7 @@ För att visa ett specifikt värde i arrayen måste det indexeras och tillhandah ```typescript export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt tredje värde är C" - log.info('My third value is: {}', [myArray[2]]) + log.info("My third value is: {}", [myArray[2]]); } ``` @@ -655,21 +665,21 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas blocknummer, blockhash och transaktionshash från en händelse: ```typescript -import { log } from '@graphprotocol/graph-ts' +import { log } from "@graphprotocol/graph-ts"; export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ + log.debug("Block number: {}, block hash: {}, transaction hash: {}", [ event.block.number.toString(), // "47596000" event.block.hash.toHexString(), // "0x..." event.transaction.hash.toHexString(), // "0x..." - ]) + ]); } ``` ### IPFS API ```typescript -import { ipfs } from '@graphprotocol/graph-ts' +import { ipfs } from "@graphprotocol/graph-ts" ``` Smart contracts occasionally anchor IPFS files onchain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. @@ -678,13 +688,13 @@ För att läsa en fil från IPFS med en given IPFS-hash eller sökväg görs fö ```typescript // Placera detta i en händelsehanterare i mappningen -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) +let hash = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D"; +let data = ipfs.cat(hash); // Sökvägar som `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` // som inkluderar filer i kataloger stöds också -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) +let path = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile"; +let data = ipfs.cat(path); ``` **Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. @@ -692,31 +702,31 @@ let data = ipfs.cat(path) It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: ```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' +import { JSONValue, Value } from "@graphprotocol/graph-ts"; export function processItem(value: JSONValue, userData: Value): void { // Se JSONValue-dokumentationen för mer information om hur man hanterar // med JSON-värden - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') + let obj = value.toObject(); + let id = obj.get("id"); + let title = obj.get("title"); if (!id || !title) { - return + return; } // Callbacks kan också skapa enheter - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Ange parent till "parentId" - newitem.save() + let newItem = new Item(id); + newItem.title = title.toString(); + newitem.parent = userData.toString(); // Ange parent till "parentId" + newitem.save(); } // Placera detta i en händelsehanterare i mappningen -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) +ipfs.map("Qm...", "processItem", Value.fromString("parentId"), ["json"]); // Alternativt kan du använda `ipfs.mapJSON`. -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) +ipfs.mapJSON("Qm...", "processItem", Value.fromString("parentId")); ``` The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. @@ -726,7 +736,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes ### Crypto API ```typescript -import { crypto } from '@graphprotocol/graph-ts' +import { crypto } from "@graphprotocol/graph-ts"; ``` The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: @@ -736,7 +746,7 @@ The `crypto` API makes a cryptographic functions available for use in mappings. ### JSON API ```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' +import { json, JSONValueKind } from "@graphprotocol/graph-ts" ``` JSON data can be parsed using the `json` API: diff --git a/website/src/pages/sv/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/sv/subgraphs/developing/creating/starting-your-subgraph.mdx index db4c083402f9..3c7846394f04 100644 --- a/website/src/pages/sv/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/sv/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Versionsanteckningar | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Versionsanteckningar | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/sv/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/sv/subgraphs/developing/deploying/multiple-networks.mdx index b45b0701bfdd..016d1a3970e6 100644 --- a/website/src/pages/sv/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/sv/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/sv/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/sv/subgraphs/developing/deploying/using-subgraph-studio.mdx index dc1facd6d5cb..0afc63760767 100644 --- a/website/src/pages/sv/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/sv/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/sv/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/sv/subgraphs/developing/publishing/publishing-a-subgraph.mdx index e13f4a7f9f7c..905759049aca 100644 --- a/website/src/pages/sv/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/sv/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` komutunu çalıştırmak tablonun tam bir sayımını yapacaktır. Bu sayım yavaş olabilir ama farklı varlıkların genel varlık sürümlerine oranını tam olarak ölçer. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> Bu, Graph Node 0.29.x sürümünde kullanılabilir olan yeni bir fonksiyonelliktir - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/tr/resources/claude-mcp.mdx b/website/src/pages/tr/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/tr/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/tr/subgraphs/_meta-titles.json b/website/src/pages/tr/subgraphs/_meta-titles.json index 1bfcfe87a948..b7139f01d3ce 100644 --- a/website/src/pages/tr/subgraphs/_meta-titles.json +++ b/website/src/pages/tr/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Sorgulama", "developing": "Geliştirme", "guides": "How-to Guides", - "best-practices": "En İyi Uygulamalar" + "best-practices": "En İyi Uygulamalar", + "mcp": "MCP" } diff --git a/website/src/pages/tr/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/tr/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/tr/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/tr/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/tr/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/tr/subgraphs/developing/creating/graph-ts/api.mdx index 1b8f899e6161..28bb6b793eb1 100644 --- a/website/src/pages/tr/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/tr/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ Dil eşlemeleri AssemblyScript ile yazıldığından, [AssemblyScript wiki'sinde The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Sürüm | Sürüm Notları | -| :-: | --- | -| 0.0.9 | Yeni host fonksiyonları ekler: [`eth_get_balance`](#balance-of-an-address) ve [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Bir varlığı kaydederken şemadaki alanların varlığını doğrulama mekanizması ekler. | -| 0.0.7 | Ethereum türlerine `TransactionReceipt` ve `Log` sınıfları eklendi
Ethereum Event nesnesine `receipt` alanı eklendi | -| 0.0.6 | Ethereum Transaction nesnesine `nonce` alanı eklendi
Ethereum Block nesnesine `baseFeePerGas` eklendi | +| Sürüm | Sürüm Notları | +| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Yeni host fonksiyonları ekler: [`eth_get_balance`](#balance-of-an-address) ve [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Bir varlığı kaydederken şemadaki alanların varlığını doğrulama mekanizması ekler. | +| 0.0.7 | Ethereum türlerine `TransactionReceipt` ve `Log` sınıfları eklendi
Ethereum Event nesnesine `receipt` alanı eklendi | +| 0.0.6 | Ethereum Transaction nesnesine `nonce` alanı eklendi
Ethereum Block nesnesine `baseFeePerGas` eklendi | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | -| 0.0.3 | Ethereum Call nesnesine `from` alanı eklendi
`ethereum.call.address`, `ethereum.call.to` olarak yeniden adlandırıldı | -| 0.0.2 | Ethereum Transaction nesnesine `input` alanı eklendi | +| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | +| 0.0.3 | Ethereum Call nesnesine `from` alanı eklendi
`ethereum.call.address`, `ethereum.call.to` olarak yeniden adlandırıldı | +| 0.0.2 | Ethereum Transaction nesnesine `input` alanı eklendi | ### Dahili Türler @@ -241,15 +241,15 @@ export function handleTransfer(event: TransferEvent): void { // İşlem hash'ını olay kimliği olarak kullanarak bir Transfer varlığı oluşturun let id = event.transaction.hash let transfer = new Transfer(id) - + // Olay parametrelerini kullanarak varlığın özelliklerini ayarlayın transfer.from = event.params.from transfer.to = event.params.to transfer.amount = event.params.amount - + // Varlığı depoya kaydedin transfer.save() -} + } ``` Zincir işlenirken bir `Transfer` olayıyla karşılaşıldığında, oluşturulan `Transfer` türü (burada varlık türüyle adlandırma çakışmasını önlemek için `TransferEvent` olarak adlandırılmıştır) kullanılarak `handleTransfer` olay işleyicisine aktarılır. Bu tür, olayın ana işlemi ve parametreleri gibi verilere erişim sağlar. @@ -771,44 +771,44 @@ Bir değerin türü kesin olduğunda, aşağıdaki yöntemlerden biri kullanıla ### Tip Dönüşümleri Referansı -| Kaynak(lar) | Hedef | Dönüşüm fonksiyonu | -| ----------------- | ----------------- | ---------------------------- | -| Address | Bytes | yok | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | Dizgi (onaltılık) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | yok | -| Bytes (işaretli) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (işaretsiz) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | Dizgi (onaltılık) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | yok | -| int32 | i32 | yok | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | yok | -| int64 - int256 | BigInt | yok | -| uint32 - uint256 | BigInt | yok | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| Dizgi (onaltılık) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Kaynak(lar) | Hedef | Dönüşüm fonksiyonu | +| ---------------------- | -------------------- | ---------------------------- | +| Address | Bytes | yok | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | Dizgi (onaltılık) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | yok | +| Bytes (işaretli) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (işaretsiz) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | Dizgi (onaltılık) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | yok | +| int32 | i32 | yok | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | yok | +| int64 - int256 | BigInt | yok | +| uint32 - uint256 | BigInt | yok | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| Dizgi (onaltılık) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Veri Kaynağı Meta Verileri diff --git a/website/src/pages/tr/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/tr/subgraphs/developing/creating/starting-your-subgraph.mdx index bfa4920f6360..2c2d7767abb6 100644 --- a/website/src/pages/tr/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/tr/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Sürüm | Sürüm Notları | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | +| Sürüm | Sürüm Notları | +| :---: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | | 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | İşleyicilerin işlem makbuzlarına erişim desteği eklendi. | -| 0.0.4 | Subgraph özelliklerini yönetme desteği eklendi. | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | İşleyicilerin işlem makbuzlarına erişim desteği eklendi. | +| 0.0.4 | Subgraph özelliklerini yönetme desteği eklendi. | diff --git a/website/src/pages/tr/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/tr/subgraphs/developing/deploying/multiple-networks.mdx index d401f6ad16b2..9af6e4bb44d7 100644 --- a/website/src/pages/tr/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/tr/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/tr/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/tr/subgraphs/developing/deploying/using-subgraph-studio.mdx index a4e8ca41d951..caa7b1cc5a3f 100644 --- a/website/src/pages/tr/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/tr/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ Bu komutu çalıştırdıktan sonra CLI sizden bir sürüm etiketi isteyecektir. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Subgraph’inizi Yayımlama diff --git a/website/src/pages/tr/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/tr/subgraphs/developing/publishing/publishing-a-subgraph.mdx index e315eb8c74fb..04bc6abfcded 100644 --- a/website/src/pages/tr/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/tr/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -47,18 +47,18 @@ As of version 0.73.0, you can also publish your Subgraph with the [`graph-cli`]( You can upload your Subgraph build to a specific IPFS node and further customize your deployment with the following flags: ``` -KULLANIM +USAGE $ graph publish [SUBGRAPH-MANIFEST] [-h] [--protocol-network arbitrum-one|arbitrum-sepolia --subgraph-id ] [-i ] [--ipfs-hash ] [--webapp-url ] -BAYRAKLAR - -h, --help CLI yardımını gösterir. - -i, --ipfs= [varsayılan: https://api.thegraph.com/ipfs/api/v0] Derleme sonuçlarını bir IPFS düğümüne yükler. - --ipfs-hash= Dağıtılacak subgraph manifestosunun IPFS hash değeri. - --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/uk/resources/claude-mcp.mdx b/website/src/pages/uk/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/uk/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/uk/subgraphs/_meta-titles.json b/website/src/pages/uk/subgraphs/_meta-titles.json index 06078a2635a4..3498d1371306 100644 --- a/website/src/pages/uk/subgraphs/_meta-titles.json +++ b/website/src/pages/uk/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Найкращі практики" + "best-practices": "Найкращі практики", + "mcp": "MCP" } diff --git a/website/src/pages/uk/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/uk/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/uk/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/uk/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/uk/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/uk/subgraphs/developing/creating/graph-ts/api.mdx index 5be2530c4d6b..2e256ae18190 100644 --- a/website/src/pages/uk/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/uk/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types diff --git a/website/src/pages/uk/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/uk/subgraphs/developing/creating/starting-your-subgraph.mdx index 180a343470b1..4931e6b1fd34 100644 --- a/website/src/pages/uk/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/uk/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Version | Release notes | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Version | Release notes | +| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/uk/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/uk/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/uk/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/uk/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/uk/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/uk/subgraphs/developing/deploying/using-subgraph-studio.mdx index 2b4c1c11efa0..a3ebd8c532fc 100644 --- a/website/src/pages/uk/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/uk/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/uk/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/uk/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/uk/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/uk/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> یہ نئی فعالیت ہے، جو گراف نوڈ 0.29.x میں دستیاب ہوگی - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/ur/resources/claude-mcp.mdx b/website/src/pages/ur/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/ur/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/ur/subgraphs/_meta-titles.json b/website/src/pages/ur/subgraphs/_meta-titles.json index 6d4a697a0e94..bd9d7799ab08 100644 --- a/website/src/pages/ur/subgraphs/_meta-titles.json +++ b/website/src/pages/ur/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "بہترین طریقے" + "best-practices": "بہترین طریقے", + "mcp": "MCP" } diff --git a/website/src/pages/ur/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/ur/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/ur/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/ur/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/ur/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/ur/subgraphs/developing/creating/graph-ts/api.mdx index d936e38aa363..638b47728dee 100644 --- a/website/src/pages/ur/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/ur/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| ورزن | جاری کردہ نوٹس | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| ورزن | جاری کردہ نوٹس | +| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### بلٹ ان اقسام diff --git a/website/src/pages/ur/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/ur/subgraphs/developing/creating/starting-your-subgraph.mdx index ec107baa126f..6361010625cb 100644 --- a/website/src/pages/ur/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/ur/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| ورزن | جاری کردہ نوٹس | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | +| ورزن | جاری کردہ نوٹس | +| :---: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | | 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/ur/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/ur/subgraphs/developing/deploying/multiple-networks.mdx index 018d2eb471e7..08562fb93c31 100644 --- a/website/src/pages/ur/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/ur/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/ur/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/ur/subgraphs/developing/deploying/using-subgraph-studio.mdx index f41499fd9c51..741771522fd9 100644 --- a/website/src/pages/ur/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/ur/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/ur/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/ur/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 0029f0a41559..6a8e4d17a9ff 100644 --- a/website/src/pages/ur/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/ur/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. @@ -340,6 +345,4 @@ For Uniswap-like Subgraphs, the `pair` and `token` tables are prime candidates f #### Removing Subgraphs -> This is new functionality, which will be available in Graph Node 0.29.x - At some point an indexer might want to remove a given Subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a Subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). diff --git a/website/src/pages/vi/resources/claude-mcp.mdx b/website/src/pages/vi/resources/claude-mcp.mdx new file mode 100644 index 000000000000..5b55bbcbe0a4 --- /dev/null +++ b/website/src/pages/vi/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/vi/subgraphs/_meta-titles.json b/website/src/pages/vi/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/vi/subgraphs/_meta-titles.json +++ b/website/src/pages/vi/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/vi/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/vi/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 5f964d3cbb78..edc1d88dc6cf 100644 --- a/website/src/pages/vi/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/vi/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### Patch Changes + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### Minor Changes diff --git a/website/src/pages/vi/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/vi/subgraphs/developing/creating/graph-ts/api.mdx index bb95b05932cc..ae9afa6b45bc 100644 --- a/website/src/pages/vi/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/vi/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the Subgraph manifest specifies the mapping API version which is run by Graph Node for a given Subgraph. -| Phiên bản | Ghi chú phát hành | -| :-: | --- | -| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Phiên bản | Ghi chú phát hành | +| :-------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
`ethereum.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Các loại cài sẵn diff --git a/website/src/pages/vi/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/vi/subgraphs/developing/creating/starting-your-subgraph.mdx index 84a5ebbc5d34..ccca7d43804a 100644 --- a/website/src/pages/vi/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/vi/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ Start the process and build a Subgraph that matches your needs: Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/README/) and conduct local testing with [Matchstick](/subgraphs/developing/creating/unit-testing-framework/). -| Phiên bản | Ghi chú phát hành | -| :-: | --- | -| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | -| 0.0.9 | Supports `endBlock` feature | -| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | -| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | -| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | -| 0.0.5 | Added support for event handlers having access to transaction receipts. | -| 0.0.4 | Added support for managing subgraph features. | +| Phiên bản | Ghi chú phát hành | +| :-------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` | +| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. | +| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs | +| 0.0.9 | Supports `endBlock` feature | +| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). | +| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). | +| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. | +| 0.0.5 | Added support for event handlers having access to transaction receipts. | +| 0.0.4 | Added support for managing subgraph features. | diff --git a/website/src/pages/vi/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/vi/subgraphs/developing/deploying/multiple-networks.mdx index 3b2b1bbc70ae..5c8016b18c91 100644 --- a/website/src/pages/vi/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/vi/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Every Subgraph affected with this policy has an option to bring the version in q If a Subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your Subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators. -Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph. On the hosted service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/vi/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/vi/subgraphs/developing/deploying/using-subgraph-studio.mdx index 8e89b2999d96..6c1cd5654231 100644 --- a/website/src/pages/vi/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/vi/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth Once you are ready, you can deploy your Subgraph to Subgraph Studio. > Deploying a Subgraph with the CLI pushes it to the Studio, where you can test it and update the metadata. This action won't publish your Subgraph to the decentralized network. +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. Use the following CLI command to deploy your Subgraph: @@ -104,6 +106,8 @@ After running this command, the CLI will ask for a version label. After deploying, you can test your Subgraph (either in Subgraph Studio or in your own app, with the deployment query URL), deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready. +> **Note**: The development query URL is limited to 3,000 queries per day. + Use Subgraph Studio to check the logs on the dashboard and look for any errors with your Subgraph. ## Publish Your Subgraph diff --git a/website/src/pages/vi/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/vi/subgraphs/developing/publishing/publishing-a-subgraph.mdx index 2bc0ec5f514c..e3e3a7e3d455 100644 --- a/website/src/pages/vi/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/vi/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=
`;将执行表的完整计数-这可能很慢,但可以精确衡量不同实体与整体实体版本的比率。 @@ -340,6 +345,4 @@ The command `graphman stats show shows, for each entity type/table in #### 删除子图 -> 这是一项新功能,将在Graph节点0.29.x中提供。 - 在某个时刻,索引人可能想要删除给定的子图。这可以通过删除部署及其所有索引数据的`graphman drop`, 轻松完成。部署可以被指定为子图名称、IPFS has、`Qm..`,或数据库命名空间`sgdNNN`。[此处](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop)提供了更多文档。 diff --git a/website/src/pages/zh/resources/claude-mcp.mdx b/website/src/pages/zh/resources/claude-mcp.mdx new file mode 100644 index 000000000000..c101c1be2117 --- /dev/null +++ b/website/src/pages/zh/resources/claude-mcp.mdx @@ -0,0 +1,122 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## 先决条件 + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP + +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## 故障排除 + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/zh/subgraphs/_meta-titles.json b/website/src/pages/zh/subgraphs/_meta-titles.json index b1655fee1ce1..3b1c4fed15a6 100644 --- a/website/src/pages/zh/subgraphs/_meta-titles.json +++ b/website/src/pages/zh/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "查询", "developing": "开发", "guides": "操作指南", - "best-practices": "最佳实践" + "best-practices": "最佳实践", + "mcp": "MCP" } diff --git a/website/src/pages/zh/subgraphs/best-practices/timeseries.mdx b/website/src/pages/zh/subgraphs/best-practices/timeseries.mdx index c18b61169631..47c83a56f7e4 100644 --- a/website/src/pages/zh/subgraphs/best-practices/timeseries.mdx +++ b/website/src/pages/zh/subgraphs/best-practices/timeseries.mdx @@ -161,7 +161,7 @@ type TokenStats @aggregation(intervals: ["hour", "day"], source: "TokenData") { - 最大正金额: @aggregate(fn: "max", arg: "greatest(amount0, amount1, 0)") - 条件总和: @aggregate(fn: "sum", arg: "case when amount0 > amount1 then amount0 else 0 end") -支持的运算符和函数包括基本算术(+、-、\_、/)、比较运算符、逻辑运算符(和、或、非)以及最大、最小、合并等SQL函数。 +支持的运算符和函数包括基本算术(+、-、_、/)、比较运算符、逻辑运算符(和、或、非)以及最大、最小、合并等SQL函数。 ### 查询参数 diff --git a/website/src/pages/zh/subgraphs/developing/creating/advanced.mdx b/website/src/pages/zh/subgraphs/developing/creating/advanced.mdx index e279b181ffb2..b421663ccc22 100644 --- a/website/src/pages/zh/subgraphs/developing/creating/advanced.mdx +++ b/website/src/pages/zh/subgraphs/developing/creating/advanced.mdx @@ -6,13 +6,13 @@ title: 高级子图功能 添加并实现高级子图功能,以增强子图的构建。 -从 `specVersion ``0.0.4` 开始,子图特征必须使用它们的 `camelCase` 名称,在清单文件顶层的 `features` 部分中显式声明,如下表所列: +从 ```specVersion ``0.0.4``` 开始,子图特征必须使用它们的 `camelCase` 名称,在清单文件顶层的 `features` 部分中显式声明,如下表所列: -| 功能 | 名字 | -| -------------------------------------------- | ---------------- | -| [非致命错误](#non-fatal-errors) | `nonFatalErrors` | -| [全文搜索](#defining-fulltext-search-fields) | `fullTextSearch` | -| [嫁接](#grafting-onto-existing-subgraphs) | `grafting` | +| 功能 | 名字 | +| ----------------------------------------------- | ---------------- | +| [非致命错误](#non-fatal-errors) | `nonFatalErrors` | +| [全文搜索](#defining-fulltext-search-fields) | `fullTextSearch` | +| [嫁接](#grafting-onto-existing-subgraphs) | `grafting` | 例如,如果子图使用 **Full-Text Search** 和 **Non-fatal Errors** 功能,则清单中的 `features` 字段应为: @@ -343,7 +343,7 @@ export function handleTransfer(event: TransferEvent): void { 在创建文件数据源时,您可以使用[DataSource上下文](/subgraphs/developing/creating/graph-ts/api/#entity-and-datasourcecontext)传递额外的信息,这些信息将可供文件数据源处理程序使用。 -如果您有多次刷新的实体,请使用 IPFS 一的基于文件的实体。实体 ID,并使用基于链的实体中的派生字段引用它们。 +如果您有多次刷新的实体,请使用 IPFS 一的基于文件的实体。实体 ID,并使用基于链的实体中的派生字段引用它们。 > 我们正在努力改进上述建议,因此查询只返回“最新”版本。 @@ -535,7 +535,7 @@ calls: > **注意:**不建议在最初升级到The Graph网络时使用嫁接。了解更多信息[此处](/subgraphs/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)。 -首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为*Grafting*。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 +首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为_Grafting_。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 当 `subgraph.yaml` 中的子图清单在顶层包含 `graft` 区块时,子图被嫁接到基础子图: diff --git a/website/src/pages/zh/subgraphs/developing/creating/graph-ts/CHANGELOG.md b/website/src/pages/zh/subgraphs/developing/creating/graph-ts/CHANGELOG.md index 20c96b935045..7349928a0860 100644 --- a/website/src/pages/zh/subgraphs/developing/creating/graph-ts/CHANGELOG.md +++ b/website/src/pages/zh/subgraphs/developing/creating/graph-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @graphprotocol/graph-ts +## 0.38.1 + +### 补丁更改 + +- [#2006](https://github.com/graphprotocol/graph-tooling/pull/2006) [`3fb730b`](https://github.com/graphprotocol/graph-tooling/commit/3fb730bdaf331f48519e1d9fdea91d2a68f29fc9) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - fix global variables in wasm + ## 0.38.0 ### 微小变化 diff --git a/website/src/pages/zh/subgraphs/developing/creating/graph-ts/api.mdx b/website/src/pages/zh/subgraphs/developing/creating/graph-ts/api.mdx index 6efd4699dd7b..2d41f9c845fb 100644 --- a/website/src/pages/zh/subgraphs/developing/creating/graph-ts/api.mdx +++ b/website/src/pages/zh/subgraphs/developing/creating/graph-ts/api.mdx @@ -29,16 +29,16 @@ title: 汇编脚本API 子图清单中的 `apiVersion` 指定了由 Graph Node 运行的特定子图的映射 API 版本。 -| 版本 | Release 说明 | -| :-: | --- | -| 0.0.9 | 添加新的主机函数[`eth_get_balance`](#balance-of-an-address) 和 [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | -| 0.0.8 | 在保存实体时添加对模式中是否存在字段的验证。 | -| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
已将 `receipt` 字段添加到Ethereum Event对象。 | -| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
baseFeePerGas字段 | +| 版本 | Release 说明 | +| :---: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.9 | 添加新的主机函数[`eth_get_balance`](#balance-of-an-address) 和 [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) | +| 0.0.8 | 在保存实体时添加对模式中是否存在字段的验证。 | +| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
已将 `receipt` 字段添加到Ethereum Event对象。 | +| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
baseFeePerGas字段 | | 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅[`迁移指南`](/resources/migration-guides/assemblyscript-migration-guide/))
`ethereum.transaction.gasUsed 重命名为 `ethereum.transaction.gasLimit\` | -| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | -| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
`ethereum.call.address` 被重命名为 `ethereum.call.to`。 | -| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | +| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | +| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
`ethereum.call.address` 被重命名为 `ethereum.call.to`。 | +| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | ### 内置类型 @@ -534,8 +534,7 @@ import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] + ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)),] let tuple = tupleArray as ethereum.Tuple @@ -769,19 +768,19 @@ if (value.kind == JSONValueKind.BOOL) { ### 类型转换参考 -| 源类型 | 目标类型 | 转换函数 | +| 源类型 | 目标类型 | 转换函数 | | -------------------- | -------------------- | ---------------------------- | | Address | Bytes | none | | Address | String | s.toHexString() | | BigDecimal | String | s.toString() | | BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | | BigInt | String (unicode) | s.toString() | | BigInt | i32 | s.toI32() | | Boolean | Boolean | none | | Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | | Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | | Bytes | String (unicode) | s.toString() | | Bytes | String (base58) | s.toBase58() | | Bytes | i32 | s.toI32() | diff --git a/website/src/pages/zh/subgraphs/developing/creating/starting-your-subgraph.mdx b/website/src/pages/zh/subgraphs/developing/creating/starting-your-subgraph.mdx index 60544fa53eaf..3f0f7f96c3cc 100644 --- a/website/src/pages/zh/subgraphs/developing/creating/starting-your-subgraph.mdx +++ b/website/src/pages/zh/subgraphs/developing/creating/starting-your-subgraph.mdx @@ -22,14 +22,14 @@ The Graph是数千个子图的所在地,这些子图已经可供查询,因 探索[API的其他资源](/subgraphs/developing/creating/graph-ts/README/),并使用[Matchstick](/subgraphs/developing/creating/unit-testing-framework/)进行本地测试。 -| 版本 | Release 说明 | -| :-: | --- | -| 1.2.0 | 添加了对[索引参数过滤器](/#indexed-argument-filters--topic-filters) 的支持,并声明了`eth_call`。 | -| 1.1.0 | 支持[时间序列和聚合](#timeseries-and-aggregations)。为`id`添加了对`Int8`类型的支持。 | -| 1.0.0 | 支持[`indexerHints`](/developing/creating-a-subgraph/#indexer-hints)功能以修剪子图。 | -| 0.0.9 | 支持`endBlock`功能。 | +| 版本 | Release 说明 | +| :---: | -------------------------------------------------------------------------------------------------------------------------- | +| 1.2.0 | 添加了对[索引参数过滤器](/#indexed-argument-filters--topic-filters) 的支持,并声明了`eth_call`。 | +| 1.1.0 | 支持[时间序列和聚合](#timeseries-and-aggregations)。为`id`添加了对`Int8`类型的支持。 | +| 1.0.0 | 支持[`indexerHints`](/developing/creating-a-subgraph/#indexer-hints)功能以修剪子图。 | +| 0.0.9 | 支持`endBlock`功能。 | | 0.0.8 | 添加了对轮询[块处理程序](/developing/creating-a-subgraph/#polling-filter)和[初始化处理程序](/developing/creating-a-subgraph/#once-filter)的支持。 | -| 0.0.7 | 添加了对[文件数据源](/developing/creating-a-subgraph/#file-data-sources)的支持。 | -| 0.0.6 | 支持快速的[索引证明](/indexing/overview/#what-is-a-proof-of-indexing-poi) 计算变体。 | -| 0.0.5 | 添加了对可以访问交易收据的事件处理程序的支持。 | -| 0.0.4 | 添加了对管理子图功能的支持。 | +| 0.0.7 | 添加了对[文件数据源](/developing/creating-a-subgraph/#file-data-sources)的支持。 | +| 0.0.6 | 支持快速的[索引证明](/indexing/overview/#what-is-a-proof-of-indexing-poi) 计算变体。 | +| 0.0.5 | 添加了对可以访问交易收据的事件处理程序的支持。 | +| 0.0.4 | 添加了对管理子图功能的支持。 | diff --git a/website/src/pages/zh/subgraphs/developing/creating/unit-testing-framework.mdx b/website/src/pages/zh/subgraphs/developing/creating/unit-testing-framework.mdx index 0bb085db72c6..4f771efa0934 100644 --- a/website/src/pages/zh/subgraphs/developing/creating/unit-testing-framework.mdx +++ b/website/src/pages/zh/subgraphs/developing/creating/unit-testing-framework.mdx @@ -1371,6 +1371,8 @@ Global test coverage: 22.2% (2/9 handlers). 日志输出包括测试运行持续时间。下面是一个示例: + + ## 常见编译器错误 > 关键:无法从具有背景的有效模块创建WasmInstance:未知导入:wasi_snapshot_preview1::尚未定义fd_write diff --git a/website/src/pages/zh/subgraphs/developing/deploying/multiple-networks.mdx b/website/src/pages/zh/subgraphs/developing/deploying/multiple-networks.mdx index 969ec7b95d03..a772d2e49204 100644 --- a/website/src/pages/zh/subgraphs/developing/deploying/multiple-networks.mdx +++ b/website/src/pages/zh/subgraphs/developing/deploying/multiple-networks.mdx @@ -212,7 +212,7 @@ Studio中的子图版本只有在满足以下条件时才会存档: 如果子图成功同步,这是一个好信号,表明它将永远运行良好。然而,网络上的新触发器可能会导致子图遇到未经测试的错误条件,或者由于性能问题或节点操作符的问题,子图开始落后。 -Graph Node公开了一个GraphQL端点,您可以查询该端点以检查子图的状态。在托管服务上,可以在`https://api.thegraph.com/index-node/graphql`使用。在本地节点的默认情况下,在`8030/graphql`端口上可用。此端点的完整架构可以在[此处](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql)找到。以下是一个检查子图当前版本状态的示例查询: +Graph Node exposes a GraphQL endpoint which you can query to check the status of your Subgraph: `https://indexer.upgrade.thegraph.com/status`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a Subgraph: ```graphql { diff --git a/website/src/pages/zh/subgraphs/developing/deploying/using-subgraph-studio.mdx b/website/src/pages/zh/subgraphs/developing/deploying/using-subgraph-studio.mdx index 889dbf99a4a8..f0f956e93dea 100644 --- a/website/src/pages/zh/subgraphs/developing/deploying/using-subgraph-studio.mdx +++ b/website/src/pages/zh/subgraphs/developing/deploying/using-subgraph-studio.mdx @@ -88,6 +88,8 @@ graph auth 一旦你准备好了,你可以将你的子图部署到子图工作室。 > 部署一个 CLI 的子图,推送它到工作室,在那里你可以测试它并更新元数据。 此操作不会将你的子图发布到去中心化的网络。 +> +> **Note**: Each account is limited to 3 deployed (unpublished) Subgraphs. If you reach this limit, you must archive or publish existing Subgraphs before deploying new ones. 使用下面的 CLI 命令来部署您的子图: @@ -104,6 +106,8 @@ graph deploy 部署后,你可以测试你的子图(在SubgraStudio或在你自己的应用中,使用部署查询 URL), 部署另一个版本,更新元数据,并在你准备就绪时发布到 [Graph Explorer](https://thegraph.com/explorer)。 +> **Note**: The development query URL is limited to 3,000 queries per day. + 使用子图工作室检查仪表板上的日志,并查找您的子图中的任何错误。 ## 发布子图 diff --git a/website/src/pages/zh/subgraphs/developing/publishing/publishing-a-subgraph.mdx b/website/src/pages/zh/subgraphs/developing/publishing/publishing-a-subgraph.mdx index f8a85bcfc0e7..97277b99a2ff 100644 --- a/website/src/pages/zh/subgraphs/developing/publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/zh/subgraphs/developing/publishing/publishing-a-subgraph.mdx @@ -53,7 +53,7 @@ USAGE FLAGS -h, --help Show CLI help. - -i, --ipfs= [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node. + -i, --ipfs= [default: https://ipfs.thegraph.com/api/v0] Upload build results to an IPFS node. --ipfs-hash= IPFS hash of the subgraph manifest to deploy. --protocol-network=