Less than 1 minute
Add a Mapping Function
Mapping functions define how blockchain data is transformed into the optimised GraphQL entities that we previously defined in the schema.graphql
file.
Add a Mapping Function
Mapping functions define how blockchain data is transformed into the optimised GraphQL entities that we previously defined in the schema.graphql
file.
Note
Check out our Mappings documentation to get more information on mapping functions.
Navigate to the default mapping function in the src/mappings
directory. You will be able to see three exported functions: handleBlock
, handleAction
, and handleAction
. Delete both the handleBlock
and handleAction
functions as you will only deal with the handleAction
function.