v3-subgraph icon indicating copy to clipboard operation
v3-subgraph copied to clipboard

Can't connect to subgraph

Open MatthewMih opened this issue 1 year ago • 1 comments

I'm using js code from link, with ethers package.

I'm trying to connect to 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3' with

const provider = new ethers.InfuraProvider(null, infura_api_key)
const URL = 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3'

const factoryQuery = `
    {
        factory(id: "0x1F98431c8aD98523631AE4a59f267346ea31F984" ) {
            poolCount
        }
    }
`
const factoryResults = await axios.post(URL, { query: factoryQuery })

As a result I get a connection error (response):

'This endpoint has been removed. If you are the owner of this subgraph you can upgrade it by going here: https://thegraph.com/hosted-service. If you have any questions, reach out to [email protected]. Learn more about why this happening here: https://thegraph.com/docs/en/sunrise/#upgrading-subgraphs-to-the-graph-network'

Please tell me what I'm doing wrong and how to solve this problem?

MatthewMih avatar Sep 24 '24 22:09 MatthewMih

Same problem

busyBeaver1 avatar Mar 03 '25 15:03 busyBeaver1

Same problem

liucanzhu avatar Apr 22 '25 03:04 liucanzhu