Skip to content

What is the use of globalID? #471

Answered by hayes
shtse8 asked this question in Q&A
Discussion options

You must be logged in to vote

Global IDs are a concept from relay. The idea is to create an id that can be resolved to a specific node without additional context. In practice this usually means a global is encoded as a combination of the type name and a unique ID. This is primarily used by the node and nodes fields. These fields accept global IDs and return the corresponding nodes. The relay client uses this for directly fetching specific nodes. Most commonly this is done when loading a new page of a connection. If a connection isn't a root query field, it is assumed to be more efficient to directly reload the parent object of the connection (assuming it is a relay node) and use that to query another page of th connec…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shtse8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #470 on July 17, 2022 15:23.