Learn

Querying Tokens with GraphQL API

Toolabs DSM provides a read-only API that uses GraphQL as a query language to programmatically access to design tokens in your DSM projects.
GraphQL API lets you query only for what you need and get exactly that information.
You will need to provide the API Key of your project with x-toolabs-token name in the header of your GraphQL queries in order to authenticate and connect to your DSM project.
Toolabs DSM - GraphQL API Page
Web App
Learn how to access design tokens in your design system programmatically using GraphQL API
Querying for Specific Themes
You need to provide the state id of the theme to be used for querying design tokens.
You can use the theme swithcer on GraphQL API Page to select the desired state and copy the state id. Then you can either send this id as a parameter in each query or put it in the header along with API Key which will make it active for all subsequent queries.
Toolabs DSM - GraphQL API Page \ Themed Queries
Web App
Querying your design tokens with specific themes with GraphQL API