Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions spec/Appendix A -- Persisted Documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,54 @@ implementation specific.
Note: A 32 character hexadecimal _custom document identifier_ is likely to be an
MD5 hash of the GraphQL document, as traditionally used by Relay.

### Document identifier syntax

A _document identifier_ must only contain colons (`:`) and characters that are
defined as
[`unreserved` in RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-2.3)
(alphanumeric characters (`A-Z`, `a-z`, `0-9`), dashes (`-`), periods (`.`),
underscores (`_`), and tildes (`~`)).

DocumentIdentifier ::

- PrefixedDocumentIdentifier
- CustomDocumentIdentifier

PrefixedDocumentIdentifier ::

- Prefix `:` Payload

Prefix :: UnreservedCharacter+

Payload :: PayloadCharacter+

CustomDocumentIdentifier :: UnreservedCharacter+ [lookahead != `:`]

PayloadCharacter ::

- UnreservedCharacter
- `:`

UnreservedCharacter ::

- Letter
- Digit
- `-`
- `.`
- `_`
- `~`

Letter :: one of

- `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`
- `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`
- `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`
- `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`

Digit :: one of

- `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`

## Persisting a Document

To utilize persisted documents for a request, the client must possess a unique
Expand Down
Loading