Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] The order data source under sources tab in .graphclientrc.yml affects the query result

Aperta
#1,001 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

@abisheik687 ci sta già lavorando.

Dal 2/7/2026.

  • #1032 di @abisheik687 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
graphql, typescript
Ambito
api

Direzione di ricerca

Start with the source ordering in .graphclientrc.yml and the aliased live queries in operations.gql, then run npx ts-node .\src\demo_live_query.ts using both source orders. Trace the generated client and pollingLive behavior to identify why the Ethereum query becomes empty; done means the same query returns the same data regardless of source order.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I found the order of .graphclientrc.yml affects the query result. Here is the steps to reproduce:
.graphclientrc.yml
sources:
- name: uniswapv3_arbitrum
handler:
graphql:
endpoint: https://gateway-arbitrum.network.thegraph.com/api/[your api key]/subgraphs/id/HyW7A86UEdYVt5b9Lrw8W2F98yKecerHKutZTRbSCX27
- name: uniswapv3_ethereum
handler:
graphql:
endpoint: https://gateway.thegraph.com/api/[your api key]/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV
plugins:
- pollingLive:
defaultInterval: 10000
documents:
- operations.gql

operations.gql:
fragment PoolLiveDataFields on Pool {
liquidity
tick
sqrtPrice
feeTier
id
}

query GetMultipleEthereumPoolLiveData($poolIds: [ID!]!) @live(interval: 5000) {
  uniswapv3_ethereum: pools(where: { id_in: $poolIds }) {
    ...PoolLiveDataFields
  }
}

query GetMultipleArbitrumPoolLiveData($poolIds: [ID!]!) @live(interval: 5000) {
  uniswapv3_arbitrum: pools(where: { id_in: $poolIds }) {
    ...PoolLiveDataFields
  }
}

demo_live_query.ts, client codes:

import {getBuiltGraphSDK} from '../.graphclient'

async function main() {
const sdk = getBuiltGraphSDK()

// chainId=1
const poolIds_ethereum = ["0xe0554a476a092703abdb3ef35c80e0d76d32939f",
"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8",
"0x7bea39867e4169dbe237d55c8242a8f2fcdcc387",
"0x493035412520336ff4719d4cee527bea55eca844",
"0xdceaf5d0e5e0db9596a47c0c4120654e80b1d706"]

// start to monitor pools on Ethereum

const ethereumStream = await sdk.GetMultipleEthereumPoolLiveData({ poolIds: poolIds_ethereum });
(async () => {
for await (const result of ethereumStream) {
console.log('[Ethereum]', result.uniswapv3_ethereum);
}
})().catch(console.error);
}
main()

run
npx ts-node .\src\demo_live_query.ts

Everything works well.

But when I the order of uniswapv3_arbitrum and uniswapv3_ethereum in .graphclientrc.yml, I get an empty result when ruuning the same client codes

This is the content of .graphclientrc.yml after changing the order:
sources:
- name: uniswapv3_ethereum
handler:
graphql:
endpoint: https://gateway.thegraph.com/api/eada99c8eee80663db1e909b89c14a3f/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV
- name: uniswapv3_arbitrum
handler:
graphql:
endpoint: https://gateway-arbitrum.network.thegraph.com/api/eada99c8eee80663db1e909b89c14a3f/subgraphs/id/HyW7A86UEdYVt5b9Lrw8W2F98yKecerHKutZTRbSCX27
plugins:
- pollingLive:
defaultInterval: 10000
documents:
- operations.gql

Lingua principale
TypeScript
Stelle
185
Fork
49
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di graphprotocol/graph-client

Tutte le issue di graphprotocol/graph-client

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.