🌐Using the Subgraph

A public subgraph that is maintained by the Linea team, and can be accessed from the following URL:

If you want to access the public subgraph on the Linea testnet, you can access it here:

You can use this default web interface to write queries in GraphQL to search through the attestation registry. Alternatively, you can use a tool such as Postman, or use the subgraph's API to query the registry directly from your own dApp.

Examples of queries that you can make using the subgraph:

  1. Get all attestations, along with the respective schema string, and the decoded attestation data:

    query MyQuery {
      attestations {
        attestationData
        decodedData
        schemaString
      }
    }
  2. Give me all attestations related issued to a specific address:

    query MyQuery {
      attestations(where: {subject: "0xd14BF29e486DFC3836757b9B8CCFc95a5160A56D"}) {
        attestationData
        decodedData
        schemaString
      }
    }
  3. Give me all attestations issued to a specific address, related to a specific schema ID, that have not been revoked.

    query MyQuery {
      attestations(
        where: {
          subject: "0xd14BF29e486DFC3836757b9B8CCFc95a5160A56D",
          schemaId: "0x7b2d17830782df831c39edcbd728a47f0a470d57fdf452b5f4226f467f48295e",
          revoked: false
        }
      ) {
        attestationData
        decodedData
        schemaString
      }
    }

As well as querying the attestation registry, you can query the schema registry, module registry, and portal registry. For example, if you want to browse the library of existing schemas:

query SchemaQuery {
  schemas {
    name
    description
    id
    context
  }
}

To get more information on using the subgraph, please refer to The Graph's documentation.

The source code for our subgraph is available in our monorepo, where you find info on deploying your own subgraph if you want to.

Last updated