Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/rpcdaemon/graphql/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cmd/rpcdaemon/graphql/graphql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ func TestGraphQLQueryBlock(t *testing.T) {
want: `{"errors":[{"message":"Cannot query field \"bleh\" on type \"Query\".","locations":[{"line":1,"column":2}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}],"data":null}`,
code: 422,
},
{ // Should return baseFeePerGas
body: `{"query": "{block{number,baseFeePerGas}}","variables": null}`,
want: `{"data":{"block":{"number":\d{8,},"baseFeePerGas":\w+}}`,
code: 200,
comp: "regexp",
},
// should return `estimateGas` as decimal
/*
{
Expand Down
53 changes: 27 additions & 26 deletions cmd/rpcdaemon/graphql/query_block.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
extraData
gasLimit
gasUsed
baseFeePerGas
logsBloom
ommerHash
ommers {
Expand All @@ -25,33 +26,33 @@
transactionsRoot
totalDifficulty
transactions {
createdContract {
address
}
cumulativeGasUsed
from {
address
}
gasUsed
gasPrice
inputData
createdContract {
address
}
cumulativeGasUsed
from {
address
}
gasUsed
gasPrice
inputData
nonce
index
value
logs {
account {
address
}
data
index
topics
}
hash
index
to {
address
}
status
index
value
logs {
account {
address
}
data
index
topics
}
hash
index
to {
address
}
status
}
}
}