You can use the Unearth API to view your data through Queries. Every datatype in Unearth can be queried and each datatype has a selection of fields that make up that piece of data. In this reference, you can see a list of every datatype available to query as well as every field each datatype stores.
Unearth datatypes often reference other pieces of data. Fields that are marked as References refer to other Unearth datatypes. For example, the User datatype has fields that reference Accounts and Projects.
When querying using the API, you can query for data within those referenced datatypes. In the following example, you can see a query that returns the id
and name
of every Account and Project associated with a given User.
query MyQuery {
users(id: "my_user_id") {
accounts {
id
name
}
projects {
id
name
}
}
}
You can use GraphiQL to test Queries in an in-browser UI. Learn how here
For help getting started using the Unearth API, see the Getting Started section
You can find more examples on how to structure Queries here, and information on Sorting and Filtering Queries here