Skip to content

bug: error while fetching data via API (POST) #898

@perepalou

Description

@perepalou

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:

Image

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions