Skip to content

Can't connect to subgraph #244

Open
Open
@MatthewMih

Description

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions