Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Query for Mirror Content on Arweave
// GraphQL query to get the Arweave transaction ID of a Mirror post
// With the transaction ID we can use `getData()` from the Arweave JS SDK, eg.
// arweave.transactions.getData('bNbA3TEQVL60xlgCcqdz4ZPHFZ711cZ3hmkpGttDt_U').then(data => { console.log(data); });
// We can use the explorer at, which queries to test it out
// With the transaction ID we can go to the URL `<YOUR_TRANSACTION_ID>` which will render the JSON
// More details on how this works on
query GetMirrorTransactions($digest: String!) {
], sort:HEIGHT_DESC, first: 1){
edges {
node {
Copy link

coffeeandcrypto commented Aug 12, 2022

I had a whole thing written up about how this didn't work for me because of the $digest variable and then I discovered/remembered that there had to be a thing somewhere in the graphql explorer to put in variables. Once I figured that out everything worked great. Would ask/recommend that the original blog post be updated with how to use that query variable section to run this query so that everything works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment