Skip to content

Latest commit

 

History

History
79 lines (61 loc) · 3.54 KB

blockchain_projects_list.md

File metadata and controls

79 lines (61 loc) · 3.54 KB

Query a list of blockchain projects

What information will I get?

This query will return all existing blockchain projects in alphabetical order. The original data source is at ethereums-lists/contracts github repository. If your project doesn't exist or is out of date, please add or update the information in the github repository (instructions).

How to execute this query?

Step 1: Go to Forta API Sandbox. Make sure the endpoint is set to https://api.forta.network/graphql in the top left corner before proceeding to the next steps.

Sandbox Endpoint Screenshot

Step 2: Create a new workspace.

New Workspace Screenshot

Step 3: Paste the following query in the Operation panel. For more details on the available project fields, please checkout the ProjectsResponse Schema.

query Projects($input: ProjectsInput) {
  projects(input: $input) {
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      cursor
      node {
        name
        id
      }
    }
  }
}

Operation Panel Screenshot

Step 4: Paste the following query parameters in the Variable panel. For more details on the available query parameters, please checkout the ProjectsInput Schema

{
  "input": {
    "first": 10
  }
}

Variable Panel Screenshot

Step 5: Click on the blue submit button on the Operation panel to execute the query.

The button will look like the following:

NOTE: The button text will be different depending on the query name.

Query Submit Button Screenshot

And that's it! You should be able to see the query results in the Response panel on the right.

The results are paginated, how do I get the next page?

If the output returns "hasNextPage": true, add the "endCursor"value for the after query parameter in the input object to get the next page of projects and execute the query.

{
  "input": {
    ...
    "after": "<END_CURSOR>"
  }
}