Skip to content

Commit c3f83dd

Browse files
Deploying to gh-pages from @ 524d3f1 🚀
1 parent 0dd8bbc commit c3f83dd

1,229 files changed

Lines changed: 1236 additions & 1250 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html><html lang=en dir=ltr class="plugin-native plugin-id-default" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.9.2"><title data-rh=true>Page Not Found | Relay</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true property=og:image content=https://relay.dev/img/relay.png /><meta data-rh=true name=twitter:image content=https://relay.dev/img/relay.png /><meta data-rh=true property=og:url content=https://relay.dev/404.html/ /><meta data-rh=true property=og:locale content=en /><meta data-rh=true name=docusaurus_locale content=en /><meta data-rh=true name=docusaurus_tag content=default /><meta data-rh=true name=docsearch:language content=en /><meta data-rh=true name=docsearch:docusaurus_tag content=default /><meta data-rh=true property=og:title content="Page Not Found | Relay"/><link data-rh=true rel=icon href=/img/favicon.png /><link data-rh=true rel=canonical href=https://relay.dev/404.html/ /><link data-rh=true rel=alternate href=https://relay.dev/404.html/ hreflang=en /><link data-rh=true rel=alternate href=https://relay.dev/404.html/ hreflang=x-default /><link data-rh=true rel=preconnect href=https://UBPJPW35NS-dsn.algolia.net crossorigin=anonymous /><link rel=alternate type=application/rss+xml href=/blog/rss.xml title="Relay RSS Feed"><link rel=alternate type=application/atom+xml href=/blog/atom.xml title="Relay Atom Feed"><link rel=preconnect href=https://www.google-analytics.com><script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","G-DCSC7FDGL5","auto"),ga("send","pageview")</script><script async src=https://www.google-analytics.com/analytics.js></script><link rel=preconnect href=https://www.google-analytics.com><link rel=preconnect href=https://www.googletagmanager.com><script async src="https://www.googletagmanager.com/gtag/js?id=G-DCSC7FDGL5"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-DCSC7FDGL5",{})</script><link rel=search type=application/opensearchdescription+xml title=Relay href=/opensearch.xml><link rel=stylesheet href=/assets/css/styles.5e4a7658.css /><script src=/assets/js/runtime~main.2aed500a.js defer></script><script src=/assets/js/main.89493c14.js defer></script></head><body class=navigation-with-keyboard><svg style="display: none;"><defs>
1+
<!doctype html><html lang=en dir=ltr class="plugin-native plugin-id-default" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.9.2"><title data-rh=true>Page Not Found | Relay</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true property=og:image content=https://relay.dev/img/relay.png /><meta data-rh=true name=twitter:image content=https://relay.dev/img/relay.png /><meta data-rh=true property=og:url content=https://relay.dev/404.html/ /><meta data-rh=true property=og:locale content=en /><meta data-rh=true name=docusaurus_locale content=en /><meta data-rh=true name=docusaurus_tag content=default /><meta data-rh=true name=docsearch:language content=en /><meta data-rh=true name=docsearch:docusaurus_tag content=default /><meta data-rh=true property=og:title content="Page Not Found | Relay"/><link data-rh=true rel=icon href=/img/favicon.png /><link data-rh=true rel=canonical href=https://relay.dev/404.html/ /><link data-rh=true rel=alternate href=https://relay.dev/404.html/ hreflang=en /><link data-rh=true rel=alternate href=https://relay.dev/404.html/ hreflang=x-default /><link data-rh=true rel=preconnect href=https://UBPJPW35NS-dsn.algolia.net crossorigin=anonymous /><link rel=alternate type=application/rss+xml href=/blog/rss.xml title="Relay RSS Feed"><link rel=alternate type=application/atom+xml href=/blog/atom.xml title="Relay Atom Feed"><link rel=preconnect href=https://www.google-analytics.com><script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","G-DCSC7FDGL5","auto"),ga("send","pageview")</script><script async src=https://www.google-analytics.com/analytics.js></script><link rel=preconnect href=https://www.google-analytics.com><link rel=preconnect href=https://www.googletagmanager.com><script async src="https://www.googletagmanager.com/gtag/js?id=G-DCSC7FDGL5"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-DCSC7FDGL5",{})</script><link rel=search type=application/opensearchdescription+xml title=Relay href=/opensearch.xml><link rel=stylesheet href=/assets/css/styles.5e4a7658.css /><script src=/assets/js/runtime~main.a3b49ab8.js defer></script><script src=/assets/js/main.89493c14.js defer></script></head><body class=navigation-with-keyboard><svg style="display: none;"><defs>
22
<symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
33
</defs></svg>
44
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||"light"),document.documentElement.setAttribute("data-theme-choice",t||"light")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script>

_src/guided-tour/rendering/fragments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Let's distill what's going on here:
9494
* The generated Flow types include a type for the fragment reference, which is the type with the `$key` suffix: `<fragment_name>$key`, and a type for the shape of the data, which is the type with the `$data` suffix: `<fragment_name>$data`; these types are available to import from files that are generated with the following name: `<fragment_name>.graphql.js`.
9595
* We use our [lint rule](https://github.com/relayjs/eslint-plugin-relay) to enforce that the type of the fragment reference prop is correctly declared when using `useFragment`. By using a properly typed fragment reference as input, the type of the returned `data` will automatically be Flow-typed without requiring an explicit annotation.
9696
* In our example, we're typing the `user` prop as the fragment reference we need for `useFragment`, which corresponds to the `UserComponent_user$key` imported from `UserComponent_user.graphql`, which means that the type of `data` above would be: `{ name: ?string, profile_picture: ?{ uri: ?string } }`.
97-
* Fragment names need to be globally unique. In order to easily achieve this, we name fragments using the following convention based on the module name followed by an identifier: `<module_name>_<property_name>`. This makes it easy to identify which fragments are defined in which modules and avoids name collisions when multiple fragments are defined in the same module.
97+
* Fragment names need to be globally unique. A useful convention to help achieve this is to name fragments with a prefix followed by an identifier: e.g. `<ComponentName>_<property_name>`. This makes it easy to identify which fragments are defined in which components and avoids name collisions when multiple fragments are defined in the same module.
9898
9999
100100
If you need to render data from multiple fragments inside the same component, you can use `useFragment` multiple times:

_src/tutorial/organizing-mutations-queries-and-subscriptions.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
# Organizing GraphQL Operations
22

3-
In Relay, GraphQL operations (Mutations, Queries, and Subscriptions) have strict naming requirements. The operation name must begin with the module name, and end with the GraphQL operation type. The name also must be globally unique.
4-
5-
:::note
6-
The "module/operation type" naming scheme originates from trying to enforce the uniqueness constraint. At Meta, Haste (a dependency management system for static resources) enforces that all module names are unique so using the module name in the operation name encourages globally unique operation names. Coupling the module name and operation name also makes it easier to locate a fragment/query/mutation if you know that name.
7-
:::
8-
9-
For example:
10-
11-
1. A Mutation in the file `MyComponent.js` must be named with the scheme `MyComponent*Mutation`.
12-
2. A Query in the file `MyComponent.react.js` must be named with the scheme `MyComponent*Query`.
13-
14-
A NewsFeed component may have mutations/queries that shouldn't logically start with `NewsFeed`, but Relay requires this _if they are defined in that file_.
3+
In Relay, GraphQL operation and fragment names must be globally unique and must end with the GraphQL operation type (e.g. `Query`, `Mutation`, `Subscription`).
154

165
### Recommended Organization For Mutations and Subscriptions
176

_src/tutorial/queries-1.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const NewsfeedQuery = graphql`
7070
Let’s break this down:
7171

7272
* To embed GraphQL within JavaScript, we put a string literal <span className="color1">marked with the <code>graphql``</code> tag</span>. This tag allows the Relay compiler to find and compile the GraphQL within a JavaScript codebase.
73-
* Our GraphQL string consists of a <span className="color2">query declaration</span> with the keyword `query` and then a query name. Note that the query name **must** begin with the module name (in this case <code>Newsfeed</code>).
73+
* Our GraphQL string consists of a <span className="color2">query declaration</span> with the keyword `query` and then a query name. The query name must be globally unique and end with `Query`.
7474
* Inside the query declaration are *fields*, which specify what information to query for*:*
7575
* Some fields are *<span className="color3">scalar fields</span>* that retrieve a string, number, or other unit of information.
7676
* Other fields are *<span className="color4">edges</span>* that let us traverse from one node in the graph to another. When a field is an edge, it’s followed by another block `{ }` containing fields for the node at the other end of the edge. Here, the `poster` field is an edge that goes from a Story to a Person who posted it. Once we’ve traversed to the Person, we can include fields about the Person such as their `name`.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/81e14949.55e41d89.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/81e14949.88b62a75.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)