Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation of blog post "2015-02-20-introducing-relay-and-graphql" #312

Merged
merged 19 commits into from
Sep 9, 2019

Conversation

renanmav
Copy link
Contributor

@renanmav renanmav commented Sep 3, 2019

Tradução para PT-BR do primeiro parágrafo
Tradução do segundo parágrafo
Tradução do terceiro parágrafo
Tradução dos dois primeiros itens da lista
Tradução dos penúltimos parágrafos
Tradução dos últimos parágrafos
@netlify
Copy link

netlify bot commented Sep 3, 2019

Deploy preview for pt-br-reactjs ready!

Built with commit 4f3dd6b

https://deploy-preview-312--pt-br-reactjs.netlify.com

@jcserracampos jcserracampos added blog Blog post translation needs review A pull request ready to be reviewed 🌐 translated Translation is completed for this page labels Sep 3, 2019
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved

Relay provides a predictable environment for developers by maintaining an invariant: a component won't be rendered until all the data it requested is available. Additionally, queries are defined statically (ie. we can extract queries from a component tree before rendering) and the GraphQL schema provides an authoritative description of what queries are valid, so we can validate queries early and fail fast when the developer makes a mistake.
Relay provêm um ambiente previsível para desenvolvedores mantendo uma constante: um componente não será renderizado até que todos os dados requeridos estejam disponíveis. Adicionalmente, queries são definidas estaticamente (ou seja, nós podemos extrair as queries da árvore de um componente antes da renderização) e o schema do GraphQL provê uma descrição autoritária de quais queries são válidas, então nós podemos validar as queries logo cedo e falhar rapidamente quando o desenvolver cometer um erro.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acredito que deve ser prove ao invés de provêm, certo?


By handling all data-fetching via a single abstraction, we're able to handle a bunch of things that would otherwise have to be dealt with repeatedly and pervasively across the application:
Com o manuseio de todo o data-fetching através de uma única abstração, nós somos capazes de lidar com um monte de coisas que de outra forma teriam que ler lidadas de forma repetitiva por toda aplicação:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ser ao invés de ler

- **Common patterns:** We can make common patterns easy. Pagination is the example that [Jing](https://twitter.com/jingc) gave at the conference: if you have 10 records initially, getting the next page just means declaring you want 15 records in total, and the framework automatically constructs the minimal query to grab the delta between what you have and what you need, requests it, and re-renders your view when the data become available.
- **Simplified server implementation:** Rather than having a proliferation of end-points (per action, per route), a single GraphQL endpoint can serve as a facade for any number of underlying resources.
- **Uniform mutations:** There is one consistent pattern for performing mutations (writes), and it is conceptually baked into the data querying model itself. You can think of a mutation as a query with side-effects: you provide some parameters that describe the change to be made (eg. attaching a comment to a record) and a query that specifies the data you'll need to update your view of the world after the mutation completes (eg. the comment count on the record), and the data flows through the system using the normal flow. We can do an immediate "optimistic" update on the client (ie. update the view under the assumption that the write will succeed), and finally commit it, retry it or roll it back in the event of an error when the server payload comes back.
- **Performance:** Todas as queries seguem pelo fluxo do framework, onde coisas que de outra forma seriam ineficientes, padrões repetidos de queries são automaticamente colapsadas em lotes eficientes, queries mínimas. Da mesma forma, o framework sabe quais dados foram previamente pedidos, ou quais requisições ainda estão acontecendo, assim, queries podem ser "disduplicadas" e queries mínimas podem ser produzidas.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

desduplicadas ao invés de disduplicadas


In the meantime, we'll be providing more and more information in the form of blog posts (and in [other channels](https://gist.github.com/wincent/598fa75e22bdfa44cf47)). As we get closer to the open source release, you can expect more concrete details, syntax and API descriptions and more.
No meio tempo, nós estaremos disponibilizando mais e mais informações na forma de posts de blog (e em [outros canais](https://gist.github.com/wincent/598fa75e22bdfa44cf47)). À medida que chegamos perto do lançamento open source, vocês podem esperar por detalhes mais concretos, sintaxe, documentações de API e mais.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uma palavra que não existe em português, mas usamos muito é post.
Recomendo usar publicação, artigo ou algo do gênero.

content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
- **Uniform mutations:** There is one consistent pattern for performing mutations (writes), and it is conceptually baked into the data querying model itself. You can think of a mutation as a query with side-effects: you provide some parameters that describe the change to be made (eg. attaching a comment to a record) and a query that specifies the data you'll need to update your view of the world after the mutation completes (eg. the comment count on the record), and the data flows through the system using the normal flow. We can do an immediate "optimistic" update on the client (ie. update the view under the assumption that the write will succeed), and finally commit it, retry it or roll it back in the event of an error when the server payload comes back.
- **Performance:** Todas as queries seguem pelo fluxo do framework, onde coisas que de outra forma seriam ineficientes, padrões repetidos de queries são automaticamente colapsadas em lotes eficientes, queries mínimas. Da mesma forma, o framework sabe quais dados foram previamente pedidos, ou quais requisições ainda estão acontecendo, assim, queries podem ser "disduplicadas" e queries mínimas podem ser produzidas.
- **Subscriptions:** Todos os dados fluem em um único store, e todas as leituras do store são feitas via framework. Isso significa que o framework sabe quais componentes precisam de quais dados e quais deles devem ser re-renderizados quando os dados mudarem; componentes nunca têm que setar subscriptions individuais.
- **Padrões comuns:** Nós podemos fazer com que padrões comuns se tornem fáceis. Paginação é o exemplo que o [Jing](https://twitter.com/jingc) deu na conferência: se você tem 10 registros inicialmente, pegar a próxima página só quer dizer que você quer 15 registros no total, e o framework automaticamente constrói a query mínima para pegar a diferença entre o que você tem e o que você precisa, faz a requisição e re-renderiza o componente quando os dados se tornam disponíveis.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta parte de getting the next page ficou um pouco sem nexo.

content/blog/2015-02-20-introducing-relay-and-graphql.md Outdated Show resolved Hide resolved
@jhonmike jhonmike added needs author response Changes requested needing author's input and removed needs review A pull request ready to be reviewed labels Sep 5, 2019
@renanmav
Copy link
Contributor Author

renanmav commented Sep 6, 2019

Mudanças propostas feitas

jcserracampos
jcserracampos previously approved these changes Sep 7, 2019
@renanmav
Copy link
Contributor Author

renanmav commented Sep 7, 2019

Há mais reviewers?

dittrichlucas
dittrichlucas previously approved these changes Sep 7, 2019
jcserracampos
jcserracampos previously approved these changes Sep 7, 2019
vitorebatista
vitorebatista previously approved these changes Sep 8, 2019
@jhonmike jhonmike removed the needs author response Changes requested needing author's input label Sep 9, 2019
@jhonmike jhonmike merged commit a048d95 into reactjs:master Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog Blog post translation 🌐 translated Translation is completed for this page
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translate 2015-02-20-introducing-relay-and-graphql.md
6 participants