diff --git a/graphql/graphql.go b/graphql/graphql.go index dadc91fac0..b25683cb0f 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -929,7 +929,7 @@ func (b *Block) RawHeader(ctx context.Context) (hexutil.Bytes, error) { func (b *Block) Raw(ctx context.Context) (hexutil.Bytes, error) { block, err := b.resolve(ctx) - if err != nil { + if err != nil || block == nil { return hexutil.Bytes{}, err } return rlp.EncodeToBytes(block)