Add GraphQL GET support for subgraph endpoints
@dotansimha ya está trabajando en esto.
Desde el 4/1/2022.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Do you want to request a feature or report a bug?
I understanding it as bug, since GET requests should be supported by GraphQL compatible services.
https://graphql.org/learn/serving-over-http/#http-methods-headers-and-body
What is the current behavior?
Currently when accessing a subgraph URL using a GET request one gets redirected to /graphql (which is expected), however the /graphql handler does not work as expected.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Here is an example:
curl \
--data '{"query":"query{signals(where:{id:\"0xb855e1847f49326ea13daeb454707faf4577604828827a780a81620000c4c2cf\"}){timestamp}}"}' \
'https://api.thegraph.com/subgraphs/id/QmXe1SyxVqha6ipb8d3hht4WZaVzy43MUVXLoqXvYrb9dX'
Returns:
{"data":{"signals":[{"timestamp":"1632414153"}]}}
The same is expected to but is not returned by:
curl \
'https://api.thegraph.com/subgraphs/id/QmXe1SyxVqha6ipb8d3hht4WZaVzy43MUVXLoqXvYrb9dX/graphql?query=query%7Bsignals(where:%7Bid:%220xb855e1847f49326ea13daeb454707faf4577604828827a780a81620000c4c2cf%22%7D)%7Btimestamp%7D%7D'
Here is a sample GraphQL URL that supports both modes:
POST
curl \
-H "Content-Type: application/json" \
--data '{"query":"{movies{name,genre}}"}' \
'https://n7b67.sse.codesandbox.io/graphql'
GET
curl \
'https://n7b67.sse.codesandbox.io/graphql?query=%7Bmovies%7Bname,genre%7D%7D'
What is the expected behavior?
GET requests should return the same results as POST requests. The difference is that the payload is passed in the URL's query string of the GET request, instead of the POST body.
- Lenguaje dominante
- Rust
- Estrellas
- 3.2k
- Forks
- 1.1k
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de graphprotocol/graph-node
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
graphprotocol/graph-node#6719 ·
-
RUSTSEC-2026-0194: Quadratic run time when checking a start tag for duplicate attribute names Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
graphprotocol/graph-node#6673 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
graphprotocol/graph-node#6650 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
graphprotocol/graph-node#6722 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
graphprotocol/graph-node#6721 ·
Todos los issues de graphprotocol/graph-node
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100