Improve multiple endpoints configuration
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- cli, developer-experience, tooling
Direzione di ricerca
Begin by locating the existing endpoint representation in project manifests and CLI flag parsing, then trace how endpoint values flow into project execution. Define the backward-compatible configuration shape and verify CLI JSON input and config-file runs; done means headers, rate limits, weighting, batch size, and retries work without breaking existing strings or arrays.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Currently specifying endpoints is fairly limited. We can only specify a string for each one. But there are many use cases where you would want to have more control over these endpoints. This could include weighting them, specifying headers or rate limiting options.
Different api providers have different ways of providing api keys and other authentication. Currently the only way to do this is with path params and we convert them to headers. This is not very flexible and can lead to logging leaking api keys.
It is nearly impossible to determine the rate limit for an endpoint, being able to specify this will allow for optimal indexing speeds given a rate limited endpoint.
Requirements
- Be backwards compatible with current flags and project manifests
- Introduce a new data structure to specify endpoints details (this is a rough example):
type EndpointConfig = {
headers?: Record<string, unknown>;
rateLimit?: { requests: number, interval: 'second' | 'minute' | 'hour' };
weighting: number; // TBD, this should allow users to specify a primary endpoint that gets used over other endpoints
batchSize?: number; // JSON RPC batch size, where applicable (ethereum)
retries?: number; // Number of retries this endpoint will make before throwing. Default 1.
}
- Allow specifying a default EndpointConfig that applies to all endpoints
Manifests network endpoint would then have the following type string | string[] | Record<string, EndpointConfig>
- CLI flags should accept json strings for this new functionality.
- We should ensure that running a project from a config file works with this feature.
- Lingua principale
- TypeScript
- Stelle
- 18.7k
- Fork
- 396
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di subquery/subql
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Improve project validationAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Tutte le issue di subquery/subql
Issue simili
-
resources
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
railmapgen/rmg-palette#2445 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
danielmiessler/LifeOS#2242 ·
I maintainer di solito rispondono entro 5 giorni
-
good first issue hacktoberfest help wanted translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/appduct#129 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100