diff --git a/.env.production b/.env.production index 237383c9e6..3584f41e5d 100644 --- a/.env.production +++ b/.env.production @@ -12,4 +12,4 @@ REACT_APP_MOONPAY_PUBLISHABLE_KEY="pk_live_uQG4BJC4w3cxnqpcSqAfohdBFDTsY6E" REACT_APP_SENTRY_ENABLED=true REACT_APP_SENTRY_TRACES_SAMPLE_RATE=0.00003 REACT_APP_STATSIG_PROXY_URL="https://api.uniswap.org/v1/statsig-proxy" -THE_GRAPH_SCHEMA_ENDPOINT="https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3" +THE_GRAPH_SCHEMA_ENDPOINT="https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3?source=uniswap" diff --git a/codegen.yml b/codegen.yml index e8f358e3a5..cf6dcedef3 100644 --- a/codegen.yml +++ b/codegen.yml @@ -1,5 +1,5 @@ overrideExisting: true -schema: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3' +schema: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3?source=uniswap' generates: ./src/graphql/thegraph/schema/schema.graphql: plugins: diff --git a/cypress/e2e/add-liquidity.test.ts b/cypress/e2e/add-liquidity.test.ts index 0bad6029da..cf8cb7d033 100644 --- a/cypress/e2e/add-liquidity.test.ts +++ b/cypress/e2e/add-liquidity.test.ts @@ -4,7 +4,7 @@ import { aliasQuery, hasQuery } from '../utils/graphql-test-utils' describe('Add Liquidity', () => { beforeEach(() => { - cy.intercept('POST', '/subgraphs/name/uniswap/uniswap-v3', (req) => { + cy.intercept('POST', '/subgraphs/name/uniswap/uniswap-v3?source=uniswap', (req) => { aliasQuery(req, 'feeTierDistribution') }) }) @@ -29,22 +29,26 @@ describe('Add Liquidity', () => { it('loads fee tier distribution', () => { cy.fixture('feeTierDistribution.json').then((feeTierDistribution) => { - cy.intercept('POST', '/subgraphs/name/uniswap/uniswap-v3', (req: CyHttpMessages.IncomingHttpRequest) => { - if (hasQuery(req, 'FeeTierDistribution')) { - req.alias = 'FeeTierDistribution' + cy.intercept( + 'POST', + '/subgraphs/name/uniswap/uniswap-v3?source=uniswap', + (req: CyHttpMessages.IncomingHttpRequest) => { + if (hasQuery(req, 'FeeTierDistribution')) { + req.alias = 'FeeTierDistribution' - req.reply({ - body: { - data: { - ...feeTierDistribution, + req.reply({ + body: { + data: { + ...feeTierDistribution, + }, }, - }, - headers: { - 'access-control-allow-origin': '*', - }, - }) + headers: { + 'access-control-allow-origin': '*', + }, + }) + } } - }) + ) cy.visit('/add/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/ETH') cy.wait('@FeeTierDistribution') diff --git a/src/graphql/thegraph/apollo.ts b/src/graphql/thegraph/apollo.ts index af05a97919..5556fdd9bc 100644 --- a/src/graphql/thegraph/apollo.ts +++ b/src/graphql/thegraph/apollo.ts @@ -4,13 +4,13 @@ import { ChainId } from '@uniswap/sdk-core' import store from '../../state/index' const CHAIN_SUBGRAPH_URL: Record = { - [ChainId.MAINNET]: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3', - [ChainId.ARBITRUM_ONE]: 'https://thegraph.com/hosted-service/subgraph/ianlapham/uniswap-arbitrum-one', - [ChainId.OPTIMISM]: 'https://api.thegraph.com/subgraphs/name/ianlapham/optimism-post-regenesis', - [ChainId.POLYGON]: 'https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v3-polygon', - [ChainId.CELO]: 'https://api.thegraph.com/subgraphs/name/jesse-sawa/uniswap-celo', - [ChainId.BNB]: 'https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v3-bsc', - [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-avax', + [ChainId.MAINNET]: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3?source=uniswap', + [ChainId.ARBITRUM_ONE]: 'https://thegraph.com/hosted-service/subgraph/ianlapham/uniswap-arbitrum-one?source=uniswap', + [ChainId.OPTIMISM]: 'https://api.thegraph.com/subgraphs/name/ianlapham/optimism-post-regenesis?source=uniswap', + [ChainId.POLYGON]: 'https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v3-polygon?source=uniswap', + [ChainId.CELO]: 'https://api.thegraph.com/subgraphs/name/jesse-sawa/uniswap-celo?source=uniswap', + [ChainId.BNB]: 'https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v3-bsc?source=uniswap', + [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-avax?source=uniswap', } const httpLink = new HttpLink({ uri: CHAIN_SUBGRAPH_URL[ChainId.MAINNET] })