Prioritize block hash over number in singular time travel queries (#462)

* Keep return value for singular subgraph entity queries nullable

* Prioritize block hash over number in time travel queries

* Throw error when block with given hash doesn't exist in db
This commit is contained in:
prathamesh0
2023-11-10 09:39:58 +05:30
committed by GitHub
parent 695723955f
commit 32d5cd10d0
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ export class Schema {
const queryObject: { [key: string]: any; } = {};
queryObject[queryName] = {
// Get type composer object for return type from the schema composer.
type: this._composer.getAnyTC(subgraphType).NonNull,
type: this._composer.getAnyTC(subgraphType),
args: {
id: 'ID!',
block: BlockHeight