Skip to content

Commit

Permalink
fix(package): updates packages to latest and fixes issues
Browse files Browse the repository at this point in the history
  • Loading branch information
braposo committed Apr 3, 2020
1 parent 74786d4 commit da4e1d3
Show file tree
Hide file tree
Showing 22 changed files with 8,526 additions and 4,897 deletions.
8 changes: 7 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
"@typescript-eslint/no-inferrable-types": "off",
"no-underscore-dangle": "off",
"import/prefer-default-export": "off",
"import/no-default-export": "error"
"import/no-default-export": "error",
"import/extensions": [
"error",
{
"ts": "never"
}
]
},
"settings": {
"import/resolver": {
Expand Down
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
skip_cleanup: true
- stage: release
deploy:
- provider: script
skip_cleanup: true
script: yarn semantic-release
- provider: script
skip_cleanup: true
script: yarn semantic-release
if: branch = master
- stage: docs
before_deploy:
- yarn docs:build
before_deploy:
- yarn docs:build
deploy:
- provider: pages
skip_cleanup: true
local_dir: .docz/dist/
github_token: $GH_TOKEN
keep_history: true
- provider: pages
skip_cleanup: true
local_dir: .docz/dist/
github_token: $GH_TOKEN
keep_history: true
if: branch = master
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
## [1.13.2](https://github.com/braposo/figma-graphql/compare/v1.13.1...v1.13.2) (2019-10-27)


### Bug Fixes

* **package:** update @types/dotenv to version 8.2.0 ([8b96705](https://github.com/braposo/figma-graphql/commit/8b9670503cf9008568dd4d86967d689c17845820))
- **package:** update @types/dotenv to version 8.2.0 ([8b96705](https://github.com/braposo/figma-graphql/commit/8b9670503cf9008568dd4d86967d689c17845820))

## [1.13.1](https://github.com/braposo/figma-graphql/compare/v1.13.0...v1.13.1) (2019-10-24)


### Bug Fixes

* fixes issue with dependencies for docs ([37b4f4f](https://github.com/braposo/figma-graphql/commit/37b4f4f3327bdf6ee42440201c75b445d9cc50a6))
- fixes issue with dependencies for docs ([37b4f4f](https://github.com/braposo/figma-graphql/commit/37b4f4f3327bdf6ee42440201c75b445d9cc50a6))

# [1.13.0](https://github.com/braposo/figma-graphql/compare/v1.12.2...v1.13.0) (2019-09-10)

Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="http://figma-graphql.party">
<img width="150" src="./assets/logo.svg">
<img width="150" src="./assets/logo.svg" />
</a>
</p>

Expand All @@ -12,7 +12,7 @@ figma-graphql

The reimagined [Figma API](https://www.figma.com/developers) (super)powered by GraphQL

[![Build Status][build-badge]][travis] [![Greenkeeper badge][greenkeeper-badge]][greenkeeper] [![Code Coverage][coverage-badge]][coverage] [![Known Vulnerabilities][snyk-badge]][snyk] [![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] <br> ![Prettier format][prettier-badge] [![Commitizen friendly][commitizen-badge]][commitizen] [![semantic-release][semantic-badge]][semantic] [![MIT License][license-badge]][license]
[![Build Status][build-badge]][travis] [![Greenkeeper badge][greenkeeper-badge]][greenkeeper] [![Code Coverage][coverage-badge]][coverage] [![Known Vulnerabilities][snyk-badge]][snyk] [![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] <br/> ![Prettier format][prettier-badge] [![Commitizen friendly][commitizen-badge]][commitizen] [![semantic-release][semantic-badge]][semantic] [![MIT License][license-badge]][license]

</div>

Expand Down Expand Up @@ -56,16 +56,20 @@ It should work with any file so can use your own Figma files and just replace `f
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://bernardoraposo.com"><img src="https://avatars2.githubusercontent.com/u/38172?v=4" width="100px;" alt="Bernardo Raposo"/><br /><sub><b>Bernardo Raposo</b></sub></a><br /><a href="#question-braposo" title="Answering Questions">💬</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Documentation">📖</a> <a href="#design-braposo" title="Design">🎨</a> <a href="#ideas-braposo" title="Ideas, Planning, & Feedback">🤔</a> <a href="#review-braposo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Tests">⚠️</a></td>
<td align="center"><a href="http://iamsaravieira.com"><img src="https://avatars0.githubusercontent.com/u/1051509?v=4" width="100px;" alt="Sara Vieira"/><br /><sub><b>Sara Vieira</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Documentation">📖</a> <a href="#review-SaraVieira" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="http://okonet.ru"><img src="https://avatars3.githubusercontent.com/u/11071?v=4" width="100px;" alt="Andrey Okonetchnikov"/><br /><sub><b>Andrey Okonetchnikov</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Documentation">📖</a> <a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Code">💻</a></td>
<td align="center"><a href="http://travisrayarnold.com"><img src="https://avatars1.githubusercontent.com/u/2762082?v=4" width="100px;" alt="Travis Arnold"/><br /><sub><b>Travis Arnold</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=souporserious" title="Documentation">📖</a></td>
<td align="center"><a href="http://bernardoraposo.com"><img src="https://avatars2.githubusercontent.com/u/38172?v=4" width="100px;" alt=""/><br /><sub><b>Bernardo Raposo</b></sub></a><br /><a href="#question-braposo" title="Answering Questions">💬</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Documentation">📖</a> <a href="#design-braposo" title="Design">🎨</a> <a href="#ideas-braposo" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/braposo/figma-graphql/pulls?q=is%3Apr+reviewed-by%3Abraposo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Tests">⚠️</a></td>
<td align="center"><a href="http://iamsaravieira.com"><img src="https://avatars0.githubusercontent.com/u/1051509?v=4" width="100px;" alt=""/><br /><sub><b>Sara Vieira</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Documentation">📖</a> <a href="https://github.com/braposo/figma-graphql/pulls?q=is%3Apr+reviewed-by%3ASaraVieira" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="http://okonet.ru"><img src="https://avatars3.githubusercontent.com/u/11071?v=4" width="100px;" alt=""/><br /><sub><b>Andrey Okonetchnikov</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Documentation">📖</a> <a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Code">💻</a></td>
<td align="center"><a href="https://souporserious.com"><img src="https://avatars1.githubusercontent.com/u/2762082?v=4" width="100px;" alt=""/><br /><sub><b>Travis Arnold</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=souporserious" title="Documentation">📖</a></td>
</tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ We want to export the components in SVG format.

> Get the screenshots of the prototype screens for a few different features to present at a product meeting
We need to go through all the files inside the team projects so we'll be using aliases.
We need to go through all the files inside the team projects so we'll be using aliases.

```gql
{
Expand All @@ -96,7 +96,7 @@ We need to go through all the files inside the team projects so we'll be using a
export(params: { format: jpg })
}
}
},
}
featureB: files(name: "Feature B") {
pages(name: "Prototype") {
frames {
Expand Down
20 changes: 12 additions & 8 deletions docs/home.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ The reimagined [Figma API](https://www.figma.com/developers) (super)powered by G
name
}
}
```
```

## Why use figma-graphql?

It's great that Figma provides an API allowing anyone to easily get the data from their design files. But that API has two characteristics that make it quite hard for people without a good technical knowledge to access it:

1. The file data has a rigid tree-shaped structure that forces people to know the exact structure of the design file and can easily break existing code by just making a small change in the design file (like grouping elements).

2. It requires multiple requests to different endpoints to get data that is related. Want to export specific frames in a file? You need to query the file data first, parse the data to get the frame ids and then make additional requests to a different endpoint to get that data.
2. It requires multiple requests to different endpoints to get data that is related. Want to export specific frames in a file? You need to query the file data first, parse the data to get the frame ids and then make additional requests to a different endpoint to get that data.

This obviously makes things a lot more complex than they need to be so we use the power of GraphQL solve these issues and add a few other features.

Expand All @@ -45,7 +45,7 @@ With figma-graphql, we focus on the person using the library, not the machines.

A good way to understand the different queries that you can build is to use the "Schema" tab on the righ-hand side of the playground and go through the different properties of all the supported types, but we've also selected a few [example scenarios](/practical-examples) that can be used as a reference for common uses of the library.

## Migrating to v2
## Migrating to v2

For v2 we've completely rebuilt the API in a more human-first approach which makes it incompatible with most of the v1 queries. To read more about the motivations and biggest changes please read the [Road to v2](/road-to-v2) section.

Expand All @@ -54,16 +54,20 @@ For v2 we've completely rebuilt the API in a more human-first approach which mak
Brought to you by these awesome contributors:

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://bernardoraposo.com"><img src="https://avatars2.githubusercontent.com/u/38172?v=4" width="100px;" alt="Bernardo Raposo"/><br /><sub><b>Bernardo Raposo</b></sub></a><br /><a href="#question-braposo" title="Answering Questions">💬</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Documentation">📖</a> <a href="#design-braposo" title="Design">🎨</a> <a href="#ideas-braposo" title="Ideas, Planning, & Feedback">🤔</a> <a href="#review-braposo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Tests">⚠️</a></td>
<td align="center"><a href="http://iamsaravieira.com"><img src="https://avatars0.githubusercontent.com/u/1051509?v=4" width="100px;" alt="Sara Vieira"/><br /><sub><b>Sara Vieira</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Documentation">📖</a> <a href="#review-SaraVieira" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="http://okonet.ru"><img src="https://avatars3.githubusercontent.com/u/11071?v=4" width="100px;" alt="Andrey Okonetchnikov"/><br /><sub><b>Andrey Okonetchnikov</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Documentation">📖</a> <a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Code">💻</a></td>
<td align="center"><a href="http://travisrayarnold.com"><img src="https://avatars1.githubusercontent.com/u/2762082?v=4" width="100px;" alt="Travis Arnold"/><br /><sub><b>Travis Arnold</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=souporserious" title="Documentation">📖</a></td>
<td align="center"><a href="http://bernardoraposo.com"><img src="https://avatars2.githubusercontent.com/u/38172?v=4" width="100px;" alt=""/><br /><sub><b>Bernardo Raposo</b></sub></a><br /><a href="#question-braposo" title="Answering Questions">💬</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Documentation">📖</a> <a href="#design-braposo" title="Design">🎨</a> <a href="#ideas-braposo" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/braposo/figma-graphql/pulls?q=is%3Apr+reviewed-by%3Abraposo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/braposo/figma-graphql/commits?author=braposo" title="Tests">⚠️</a></td>
<td align="center"><a href="http://iamsaravieira.com"><img src="https://avatars0.githubusercontent.com/u/1051509?v=4" width="100px;" alt=""/><br /><sub><b>Sara Vieira</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Code">💻</a> <a href="https://github.com/braposo/figma-graphql/commits?author=SaraVieira" title="Documentation">📖</a> <a href="https://github.com/braposo/figma-graphql/pulls?q=is%3Apr+reviewed-by%3ASaraVieira" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="http://okonet.ru"><img src="https://avatars3.githubusercontent.com/u/11071?v=4" width="100px;" alt=""/><br /><sub><b>Andrey Okonetchnikov</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Documentation">📖</a> <a href="https://github.com/braposo/figma-graphql/commits?author=okonet" title="Code">💻</a></td>
<td align="center"><a href="https://souporserious.com"><img src="https://avatars1.githubusercontent.com/u/2762082?v=4" width="100px;" alt=""/><br /><sub><b>Travis Arnold</b></sub></a><br /><a href="https://github.com/braposo/figma-graphql/commits?author=souporserious" title="Documentation">📖</a></td>
</tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Expand Down
4 changes: 2 additions & 2 deletions docs/road-to-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ Let's look at this query for example:
}
```

This is using just the team ID as a starting point to get through all the different projects inside a team, then get all the files for each project and then export all frames from each file in the default jpg format as well as getting all the comments associated with each file.
This is using just the team ID as a starting point to get through all the different projects inside a team, then get all the files for each project and then export all frames from each file in the default jpg format as well as getting all the comments associated with each file.

It might seem a simple query but it's in fact using four different endpoints and making several requests to get all that information. But it does that in a way that is completely hidden to the user, who doesn't have to deal witht the complexity of the system.

By making these properties available in their context we make the query much more natural and augment the capababilities of the existing REST API.
By making these properties available in their context we make the query much more natural and augment the capababilities of the existing REST API.
1 change: 0 additions & 1 deletion doczrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export default {
title: "figma-graphql",
description: "The reimagined Figma API (super)powered by GraphQL",
src: "./docs",
themeConfig: {
colors: {
link: "#1ABCFE",
Expand Down
Loading

0 comments on commit da4e1d3

Please sign in to comment.