Querying Attio data
The App SDK provides a GraphQL API for querying data within Attio. You can use this API to retrieve Attio’s standard and custom records, information about the current user, and other relevant data.Example: Get a person’s contact details
First, create a new.graphql
file within your application and include the following GraphQL query:
get-person-contact-details.graphql
The App SDK includes useQuery hook for querying within React components.
Example: Get a text attributes value on a company record
First, create a new.graphql
file within your application and include the following GraphQL query:
get-text-attribute-value.graphql
You can find the slug of an attribute in:
Settings > Data > Objects > Attributes > (three dots menu) > Copy slug.
Exploring the GraphQL schema
To inspect the App SDK’s GraphQL schema, runnpx attio dev
and press o
.
This opens a local GraphiQL instance in read-only mode, where you can browse available types and operations.
Query execution against workspace data is not yet supported in the playground.
attioFetch
from within your server functions.