Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [the-graph]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Corrupted string is being returns in the subgraph

I've created a subgraph, and it returns a corrupted string: Look at the "domain" value.
amit's user avatar
  • 390
0 votes
1 answer
83 views

I want a GRT tokens faucet site or any link where I can buy these testnet

I want a Graph-Token (GRT) faucet site or any link where I can buy these testnet.
hammad ali's user avatar
0 votes
0 answers
9 views

issues in compiling the-graph

I have a Factory contract which is used for creating three types of smart contracts. Each of these contracts has the same OwnershipTransferred event, and so I was trying to avoid code duplication in ...
stuckoverflow's user avatar
0 votes
0 answers
18 views

Data Fetching from an Aave subgraph

Hi guys I am writing a dApp which deals with liquidations flash loans etc, The 1st step of development is to receive the user addresses who have borrowed more than zero from 'The Graph' I use hardhat....
NeoRusI's user avatar
  • 11
1 vote
0 answers
62 views

Convert UniSwap ID from Graph Query to position token id

I'm sure, the answer is very simple, still I can't figure it out. I know I can get a list of all active UniSwap positions (not closed) positions by querying the subgraph (I'm on Arbitrum): query ...
Kurt's user avatar
  • 31
1 vote
0 answers
64 views

After successfully deploying a subgraph via The Graph to Mumbai it suddenly stops working for no apparent reason

so I have succesfully deployed a subgraph to a fork of the masterchef contract from sushiswap. Before beeing able to sync up properly, the subgraph suddenly throws an error and stops. The error ...
CheeseMcBurger's user avatar
0 votes
0 answers
24 views

Live Price monitor

How does dexscreener or dextools websites keep up with the price changes efficiently on thousands of tokens? Can anyone provide a sample code for that? if not, then a roadmap of steps to be taken, ...
Melardev's user avatar
  • 101
0 votes
0 answers
11 views

Is there any way to change the default ethereum template?

I'm here to ask a question about graph-ts. If this is not the channel, please tell me. Is there any way to change the default ethereum template? I want to receive additional miner or nonce values ​​...
권승미's user avatar
1 vote
1 answer
50 views

The simplest way to return a list of items + gas limits on long lists when using pragma experimental ABIEncoderV2?

This question has two parts. I would like to return a list of items from my smart contract in a simple way, ideally a one-liner solution, something that I consume on the front-end. I tried some of the ...
Mars Robertson's user avatar
0 votes
0 answers
89 views

Not able to add `dataSource` to existing subgraph

I am new to GraphQL & The Graph protocol. I have an exisitng subgraph with already 2 dataSource and deployed. Now I want to add 1 more new dataSource to subgraph. According to The Graph docs, I ...
Rishabh Raghwendra's user avatar
0 votes
1 answer
37 views

Is there a script to automatically re-deploy a subgraph?

I have a subgraph that is running on a EC2 Instance and I want to be able to re-compile it, re-generate it and re-deploy it every time a configuration changes. When I say configuration, I refer to the ...
Falcon Stakepool's user avatar
0 votes
1 answer
106 views

How to get the subgraph hash once compiled and deployed using graph-cli?

I have a graph-node running in a EC2 instance. The subgraph has been compiled, created and deployed already and it is running with no issues. I want to query its status by running the following ...
Falcon Stakepool's user avatar
1 vote
1 answer
99 views

Subgraph returning null for some addresses

I have deployed a version of the open-zeppelin-subgraph (https://github.com/OpenZeppelin/openzeppelin-subgraphs) and I am tracking ERC20, ERC721 and ERC1155 tokens. I am using this query: { ...
Falcon Stakepool's user avatar
1 vote
1 answer
195 views

Does the graph-node re-sync all blocks every time it gets restarted?

I am running an EC2 instance with graph-node, using docker. Let's assume that I have a list of smart contracts that I want my subgraph to track and, at some point, that list gets updated; so I have to ...
Falcon Stakepool's user avatar
2 votes
3 answers
1k views

What is the current size of a copy of the entire Polygon Mainnet chain?

I want to know the total size (in GB or TB) of the database on a node that has a copy of the entire Polygon Mainnet chain, so I can allocate resources for a production instance. How can I know that? I ...
Falcon Stakepool's user avatar
0 votes
1 answer
107 views

What is the size of Polygon Mumbai chain in GB?

I want to know the total size of the chain because I am running a The Graph Node on an EC2 instance and I have to allocate resources to that.
Falcon Stakepool's user avatar
0 votes
1 answer
47 views

how define multiple @fulltext search in a GRT subgraph?

I have a graphql.schema file in my subgraph(GRT) I try to write a search for 3 entity but the graph accepts one @fulltext type like this: type _Schema_ @fulltext( name: "ABXsearch" ...
Zig Balthazar's user avatar
0 votes
1 answer
42 views

Is there a way to enable logs for graph commands?

I am running the following version of graph-cli: @graphprotocol/graph-cli/0.42.4 linux-x64 node-v18.15.0 Is there a way to setup a log or have more details after each command gets executed?
Falcon Stakepool's user avatar
0 votes
1 answer
49 views

Deploy of subgraph fails in Amazon EC2 Instance

I want to run graph-node (The Graph) in an Amazon EC2 Instance. I have setup everything with docker-compose and the 3 containers (graph-node, ipfs and postgres) are running smoothly. I have also setup ...
Falcon Stakepool's user avatar
2 votes
2 answers
173 views

How to use Open Zeppelin subgraphs to query ERC721 balance?

I have created an Open Zeppelin subgraph so I can track many different ERC20, ERC721 and ERC1155 smart contracts. My config.json looks like this: { "output": "generated/sample."...
Falcon Stakepool's user avatar
0 votes
1 answer
198 views

the Graph error : only rinkeby or mainnet!

I try to deploy my subgraph on the Goerli network, in the subgraph.yaml and subgraph studio, I select Goerli Network but, when I run the deploy command it shows me this error: what should I do!?
Zig Balthazar's user avatar
0 votes
1 answer
833 views

How to fix a subgraph deployment?

I've deployed a subgraph to a graph-node that I'm hosting myself, however the subgraph has a bug and is continuously attempting to re-execute the event handler but continuously fails on that bug. I've ...
MShakeG's user avatar
  • 1,703
1 vote
0 answers
87 views

Uniswap V3 Pool Subscription

I am trying to subscribe to uniswap v3 pool events and this is my query subscription { pool(id: "0x0001fcbba8eb491c3ccfeddc5a5caba1a98c4c28") { id, token0 { id symbol ...
Rafael's user avatar
  • 11
1 vote
1 answer
327 views

Error during initialization of subgraph using Graph Indexing Protocol

I am trying to initialize a subgraph using the Graph Protocol but keep getting the error below. My npm version is 9.1.2, yarn version is 3.2.3, node version is 18.12.1, and graph version is 0.36.1. ...
May's user avatar
  • 21
1 vote
1 answer
408 views

How to Use Subgraph Enums in the Mapping?

Subgraph documentation mentions enums but does not show how to use them in mappings. I tried to import it from the generated schema, along with other type definitions, but compiler gives error: ...
ferit's user avatar
  • 517
0 votes
1 answer
434 views

UniswapV3 analytics showing different TVL to subgraph query

Uniswap's official analytics page shows the USDC/ETH 0.05% pool as having TVL = $210.20m When I query the same pool on The Graph I get TVL at $333m example query: {pool(id : "...
D10001's user avatar
  • 23
0 votes
2 answers
37 views

how to search for the destination of a transaction

I defined a subgraph without the contract address - kind: ethereum/contract name: Trove network: mainnet source: abi: Trove startBlock: 5 mapping: kind: ethereum/...
Micha Roon's user avatar
  • 2,203
0 votes
1 answer
266 views

How to develop a network or chain agnostic subgraph?

Multichain applications setup a network/chain config that could be simplified to an object where each key is a unique ID for a supported chain such as the chainId as follows: // typescript: enum ...
MShakeG's user avatar
  • 1,703
2 votes
0 answers
174 views

Cannot decode function call in subgraph code

This is with: graph-cli v0.34.0 graph-ts v0.28.0 I'm trying to decode a function call in my subgraph mapping but it's not working. There is a tuple in the function input that seems to be causing the ...
Phil's user avatar
  • 71
0 votes
1 answer
503 views

Fetching IPFS data Subgraph Studio does not support mappings with ipfs methods

I am using the graph and am looking to get NFT meta data via ipfs in a transfer event. Everything works as expected unless I try to fetch meta data via ipfs The schema looks like type Example @entity {...
caffeinescript's user avatar
2 votes
1 answer
448 views

Can I tell to a local graph node (the graph) to not scan blocks on initialization?

I'm running a node graph locally using The Graph. I connected it to a HardHat network. As soon as I run the docker-compose I noticed that the graph starts scanning the whole blockchain history. Can ...
Jacob's user avatar
  • 155
1 vote
1 answer
56 views

How to use The Graph (GRT) with Quorum to index events and serve them via GraphQL?

I saw a few videos of using a graph node to index blockchain events, and serve them via graphql, which seemed very useful. The common pattern in these videos that I observed: They are using Infura/...
Somjit's user avatar
  • 265
0 votes
1 answer
70 views

net_version changes every time ganache starts

I'm running ganache with the --database.dbPath option to store the state between starts. I'm also using a graph-node instance to index the events of the smart-contracts. This works fine the first time ...
Micha Roon's user avatar
  • 2,203
1 vote
0 answers
417 views

Is there a way to subscribe to a The Graph subgraph?

I want to use GraphQL subscription to be able to watch for all changes in the liquidity pools. Is there a way to do this with The Graph or another possible option?
n3n3's user avatar
  • 608
0 votes
1 answer
141 views

Adding a groupby ability to subgraph of the graph protocol

How would I add the aggregation and grouping to a subgraph deployed as a hosted service on thegraph protocol? The schema.graphql does not support adding a type Query{...} or a type object in general ...
Ege's user avatar
  • 101
0 votes
1 answer
101 views

How to filter and access the unindexed event parameters?

I was doing a project, and I have an event event AddedDoctor( address indexed doctorAddress, string indexed name, string indexed doctorRegistrationId, uint256 ...
saditya's user avatar
  • 11
0 votes
1 answer
675 views

How do I get GraphQL query to get data for a specific Pancake LP pair from pancake swap hosted graph

I am trying to get Pancake-Pair data by quering the subgraph (Hosted at : https://thegraph.com/hosted-service/subgraph/mmontes11/pancakeswap) . I want to filter data by pair-contract address . I ...
Siddharth Bhoite's user avatar
1 vote
2 answers
303 views

subgraph resolve error: Serialization error: missing field `name`

I'm going though Patrick's solidity course. I'm on 28:36:52. I'm trying to deploy my subgraph and I'm getting this error. ✖ Failed to deploy to Graph node https://api.studio.thegraph.com/deploy/: ...
Harendra Shakya's user avatar
3 votes
0 answers
108 views

Return transactions for a specific pair - TheGraph

I am trying to return the latest 1000 transactions for a specific pair in Uniswap V2 using The Graph playground. The pair I am using is for USDC/WETH and its id is: ...
Magofoco's user avatar
  • 250
1 vote
1 answer
3k views

Graph Deploy failed due to subgraph validation error

I'm going through Nader Dabit's Web3 Blog and everything works just fine until I have to run yarn deploy which runs a script from my package.json { "name": "casen-blog", "...
0xBallmersPeakAdvocate's user avatar
1 vote
0 answers
82 views

API for find smart-contract deployed which chain?

Is there any API which gives me details that project smart-contract deployed on which chain via its smart-contract address? e.g. How to know whether it deployed in polygon, avalanche, ethereum? If is ...
Anjan50's user avatar
  • 11
1 vote
1 answer
356 views

Receive an error when trying to run yarn codegen using the graph to generate types for contract ABIs

Hello Team I Receive the Following Error when using the Graph yarn codegen command trying to generate types for contract ABIs × Failed to generate types for contract ABIs: Failed to generate types for ...
Kay Albertus's user avatar
0 votes
1 answer
126 views

Can the graph only index indexed parameters?

I have an event that looks like this: event ItemListed( address indexed seller, address indexed nftAddress, uint256 indexed tokenId, uint256 price ); And I'd ...
Patrick Collins's user avatar
1 vote
1 answer
344 views

How to index internal transactions in subgraph?

I'm trying to create a subgraph using callHandlers. It doesn't seem to index function calls that come from a smart contract, only EOAs. Is there a way I can ensure these are included in the subgraph?...
doylio's user avatar
  • 125
0 votes
1 answer
391 views

How to call functions or access public mappings from inside of a subgraph?

I have this struct and mapping inside my smart-contract: struct attrStruct { uint256 generation; string faction; } mapping(uint256 => attrStruct) public attributes; I want to fetch and ...
Accretence's user avatar
1 vote
1 answer
229 views

Event Monitoring - TheGraph, AWS, Alchemy

I am looking for any ideas on the best way (from a production standpoint) to have a queryable way to get the balance of accounts in a smart contract which would be deployed on multiple EVM compatible ...
chr's user avatar
  • 56
1 vote
2 answers
331 views

What Is The Best Way To Retrieve All Transactions of a Certain Token?

I am currently trying to better understand purchasing trends of certain NFTs (ERC-721). Currently, I am doing this using EtherScan's API. Now, the API calls return "up to a maximum of the last ...
curiousHuman's user avatar
1 vote
0 answers
46 views

Ethereum Node on AWS

I am running an Ethereum node on AWS. I am having problems connecting my Graph node that was built using Google provisioning services. Any suggestions for where to look for the error?
Jeff's user avatar
  • 11
1 vote
3 answers
2k views

Problem compiling subgraph with graph-ts new version

I'm getting this error: ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/value/Value | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/value/Value'. I know it is for this ...
Falcon Stakepool's user avatar
3 votes
1 answer
1k views

What is the default query limit on The Graph?

Say I have a GraphQL query like this, which I execute against a subgraph powered by The Graph: { foo { id bar } } What is the default number of instances of foo that a subgraph returns?
Paul Razvan Berg's user avatar