graphprotocol / graphprotocol/docs
bug: error while fetching data via API (POST)
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 85
- Forks
- 162
- Avg merge
- 6h 31m
- Merged PRs (30d)
- 4
Description
Hey team,
Graph queries have suddenly started failing without any change being done on the requesting app.
It looks like queries via a POST request will result in an error saying the dataset doesn't contain a field:
{
"data": null,
"errors": [
{
"message": "Type `Swapped` has no field `timestamp`"
}
]
}
The current dataset ID used for the queries is: CeYhesP82fvU47dLNVHXzSB6iS67eQU3pvUjkyXxaLfU
However, if queries are done using TheGraph Explorer UI, results will be shown as in the following example:
Used queries are the following:
- Query for POST request:
{
"query": "query SINGLE_CHAIN_TRADES($from: Int, $to: Int) { swappeds( orderBy: timestamp\n orderDirection: desc,\n first: 1000,\n where: {timestamp_lte: $to, timestamp_gte: $from}\n ) {\n id\n sender\n srcToken\n amountIn\n timestamp\n }\n \n}",
"variables": {
"offset": 0,
"from": 1701694760,
"to": 1741772040
}
}
- Query for UI request:
{
swappeds( orderBy: timestamp orderDirection: desc,
first: 1000,
where: {
timestamp_lte: 1741772040,
timestamp_gte: 1701694760
} ) {
id
sender
srcToken
amountIn
timestamp
}
}
Thanks in advance for taking a look!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the POST query against dataset CeYhesP82fvU47dLNVHXzSB6iS67eQU3pvUjkyXxaLfU and compare it with the Graph Explorer request, then trace why the Swapped type differs. Done means identifying the cause of the POST-versus-Explorer behavior and documenting the actionable fix scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100