-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update the specs for re-relaying #1
Changes from all commits
93ec6ac
5414128
dc94a59
1f0807f
3421492
4e018bc
5b220c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
Relay Input Object Mutations Specification | ||
Relay Classic Input Object Mutations Specification | ||
------------------------------------------ | ||
|
||
Relay's support for mutations relies on the GraphQL server exposing | ||
Relay Classic's support for mutations relies on the GraphQL server exposing | ||
mutation fields in a standardized way. These mutations accept and emit a | ||
identifier string, which allows Relay to track mutations and responses. | ||
identifier string, which allows Relay Classic to track mutations and responses. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this was a stated intent for Modern, the identifier string ( |
||
|
||
All mutations may include in their input a `clientMutationId` string, which is | ||
then returned as part of the object returned by the mutation field. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doc could probably stay in relay? it's only for relay classic now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
Relay Global Object Identification Specification | ||
GraphQL Global Object Identification Specification | ||
------------------------------------------------ | ||
|
||
Relay's support for object identification relies on the GraphQL server exposing | ||
object identifiers in a standardized way. In the query, the schema should | ||
provide a standard mechanism for asking for an object by ID. In the response, | ||
the schema provides a standard way of providing these IDs. | ||
To provide options for GraphQL clients to elegantly handle for caching and data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is “to handle for” English? I like adding the examples 👍 |
||
refetching GraphQL servers need to expose object identifiers in a standardized | ||
way. In the query, the schema should provide a standard mechanism for asking | ||
for an object by ID. In the response, the schema provides a standard way of | ||
providing these IDs. | ||
|
||
We refer to objects with identifiers as "nodes". | ||
|
||
|
@@ -28,9 +29,9 @@ refetching. | |
|
||
# Reserved Types | ||
|
||
A GraphQL Relay server must reserve certain types and type names | ||
to support the object identification model used by Relay. In particular, this | ||
spec creates guidelines for the following types: | ||
A GraphQL server compatible with this spec must reserve certain types and type names | ||
to support the consistent object identification model. In particular, this spec creates | ||
guidelines for the following types: | ||
|
||
- An interface named `Node`. | ||
- The `node` field on the root query type. | ||
|
@@ -294,21 +295,21 @@ might return: | |
} | ||
``` | ||
|
||
For Relay to be able to link the usernames to the responses, it needs to | ||
For clients to be able to link the usernames to the responses, it needs to | ||
know that the array in the response will be the same size as the array | ||
passed as an argument, and that the order in the response will match the | ||
order in the argument. We call these *plural identifying root fields*, and | ||
their requirements are described below. | ||
|
||
## Fields | ||
|
||
A Relay-compliant server may expose root fields that accept a list of input | ||
arguments, and returns a list of responses. For Relay to use these fields, | ||
A server compliant with this spec may expose root fields that accept a list of input | ||
arguments, and returns a list of responses. For spec-compliant clients to use these fields, | ||
these fields must be *plural identifying root fields*, and obey the following | ||
requirements. | ||
|
||
NOTE Relay-compliant servers may expose root fields that are not *plural | ||
identifying root fields*; the Relay client will just be unable to use those | ||
NOTE Spec-compliant servers may expose root fields that are not *plural | ||
identifying root fields*; the spec-compliant client will just be unable to use those | ||
fields as root fields in its queries. | ||
|
||
*Plural identifying root fields* must have a single argument. The type of that | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a hard time understanding this sentence. I know you didn’t write this, but do you understand what it’s trying to convey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's talking about always using the same args in each connection for pagination
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g.
before
after
next
the_other_one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading further, I think they mean in the literal query text, and then what you said yeah