Open Web App GraphQL API

Right now, the GraphQL API in the Web App is allowed to be used only inside the Web App itself. It would be great to have the ability to use it outside of Web App, so that we can, for example, parse document data, extract all kinds of tokens (also possibly custom), use different languages (not only JS with sketch-file NPM package), etc.

It’s kind of bummer, you have to still download a file, to process in during CI, while you have it already in the cloud and available as API.

Thanks for sharing your feedback, @oleksify :+1:

We’re always looking for ways to enable you to get what you want out of your sketch documents. And while we don’t yet have a comprehensive public API, I’m really keen to hear what you and others might want to use such an API for :ear:

On the topic of tokens, I’m keen to share that last year we shipped an API for exporting/accessing colour variables as tokens from your documents, and we do want to extend this to expose other tokens (layer & text styles) and handoff information in a similar way in the future.

1 Like

Thanks @tim

Color tokens are great. But it’s just a tiny piece of what is required. I thought I could overcome this by just parsing the file itself - downloading it through a shared link or API, and then getting what I need from it, but it was disappointing to find out that it’s technically not possible to have a stable link to latest file version for the web.

This basically stopped my further work on getting back to Sketch from Figma :frowning:

@tim As a temporary solution, is it possible to at least have a permanent link to the latest version of the file from sketch cloud? I did not find any solution so far, so as last resort would be writing a headless browser script that will just go there, and find the link in the UI.

2 Likes

I tried to do this in my plugin and couldn’t find any information about it.