graphprotocol / graph-client

The Graph library for building GraphQL-based dapps in a decentralized way.
MIT License
174 stars 44 forks source link

resolver - _meta.block.number #739

Open StephanGerbeth opened 4 months ago

StephanGerbeth commented 4 months ago

Hi,

is it possible to extend a graphql type with a block number of the block-tracking-plugin? e.g. ...

extend type Lock {
      blockNumber: Int! @resolveTo(
        sourceName: "unlock"
        sourceTypeName: "Query",
        sourceFieldName: "_meta",
        requiredSelectionSet: "{ block { number } }",
        sourceArgs: {}
     )
}

Thanks :)