Questions tagged [thegraph]

TheGraph is a solution for accessing blockchain data from SQL via GraphQL interface implemented as, as well as an approach to generate schema and mappings from smart contracts.

TheGraph is a solution for accessing blockchain data from SQL via GraphQL interface implemented as graph_node, as well as an approach to generate schema and mappings from smart contracts.

44 questions
0
votes
0 answers

graph-cli installs but is not getting read on MacOS

I am installing @graphprotocol/graph-cli with yarn with the command yarn global add @graphprotocol/graph-cli I get the success message saying: success Installed "@graphprotocol/graph-cli@0.31.0" with binaries: - graph But when I try to check its…
0
votes
1 answer

deployment failure::network not supported by registrar: no network bsc found on chain ethereum

× Failed to deploy to Graph node https://api.thegraph.com/deploy/: deployment failure::network not supported by registrar: no network bsc found on chain ethereum error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run…
Kroim
  • 93
  • 7
0
votes
1 answer

Matchstick: Assertion error: expected field equal '' but was ''

During testing my Graph Project I receive the following error: nft-lottery Player entity (assert.fieldEquals) Expected field 'lotteries' to equal '[0x1]', but was '[]' instead. Mapping aborted at…
haraslub
  • 151
  • 1
  • 10
0
votes
1 answer

Unexpected error upon calling hook: Missing value for non-nullable field

I am trying to build a subgraph for Graph Protocol following the example here (the example with the more performant way). During compilation of my Graph protocol project using a testing tool matchstick-as ^0.5.0, I get the following error: Igniting…
haraslub
  • 151
  • 1
  • 10
0
votes
1 answer

Can I call balanceOf in Matchstick without mocking it

I'm trying to calculate the price of some tokens in an AMM (we're on Moonbeam so getting the price in USDC by routing it through GLMR-quoted pools) export function tokenPrice(token: string): BigInt { switch(token){ case DOT: let glmrDot…
Steve
  • 4,457
  • 12
  • 48
  • 89
0
votes
1 answer

How to filter and access the unindexed event parameters in solidity using javascript?

I was doing a project, and I have an event event AddedDoctor( address indexed doctorAddress, string indexed name, string indexed doctorRegistrationId, uint256 dateOfRegistration, string specialization, …
saditya
  • 93
  • 1
  • 10
0
votes
1 answer

Find published subgraph in rinkeby testnet from the Graph explorer

I have published my NFT contract on Rinkeby testnet and built, deployed, and published a subgraph in the graph network for Rinkeby network: But I can't seem to find the subgraph on the Graph Explorer. How can I access the subgraph from the…
Tahlil
  • 1,031
  • 1
  • 14
  • 26
0
votes
1 answer

Can not build a subgraph: indentation error

I am trying to create a subgraph with the graph-cli and publish it to the Graph network. Here is my subgraph yaml file: specVersion: 0.0.4 schema: file: ./schema.graphql dataSources: – kind: ethereum name: Contract network: mainnet …
Tahlil
  • 1,031
  • 1
  • 14
  • 26
0
votes
1 answer

How to check the contents of postgres

I'm running tests with Matchstick and my save() calls don't seem to be working (I set up my tests by saving some entities, but then my application code doesn't see them when it goes to load). Is there any way to check the current state of the…
Steve
  • 4,457
  • 12
  • 48
  • 89
0
votes
2 answers

Index future generated contracts using TheGraph

I have an ethereum contract that is called: tokenFactory.sol This contract generates ERC20 tokens as it goes along, and when it does it emits and event that has the generated ERC20 address. I would like to go and then index the Transfer event of…
blockbyblock
  • 115
  • 5
0
votes
1 answer

The Graph: How can I include in my response this "price" value that exists in a different GraphQL type?

I'm working with thegraph.com and created a subgraph to index blockchain data from a NFT marketplace smart contract I'm building from scratch, just for my own educational purposes. At the same time I'm using using GraphQL and building queries here…
elvismdev
  • 1,027
  • 11
  • 21
0
votes
0 answers

Invalid or incomplete introspection result

When I am trying to run the below subscription code I am getting the error: TypeError: Invalid or incomplete introspection result. Ensure that you are > passing the 'data' attribute of an introspection response and no 'errors' > were returned…
0
votes
0 answers

Can a rails app and a subgraph created using The graph protocol share the same postgres db?

Do you know if it’s possible for a rails (or nodejs) app to share the same postgres db as a subgraph that's been created using The graph protocol? Or does the subgraph need a dedicated db? If it does, would a rails app reading from multiple database…
Sofiane
  • 111
  • 1
  • 6
0
votes
2 answers

How to run the graph-node in the rinkeby test rpc

I am trying to write a subgraph for the contract which is deployed in the rinkeby test network. for that I need to run the graph-node in the same rinkeby test network. With the reference of the below…
Suganth G
  • 5,136
  • 3
  • 25
  • 44
1 2
3