You can get global node IDs of objects via the REST API and or webhooks, and then use them in GraphQL operations.
In this article
...
Note: In REST, the global node ID field is named node_id
, and in webhooks, the global node ID field is named resource_id
. In GraphQL, it's an id
field on the node
interface. For a refresher on what "node" means in GraphQL, see "Introduction to GraphQL."
Putting global node IDs to use
You can follow three steps to use global node IDs effectively:
...
This type of query is the standard approach for looking up an object by its global node ID.
Using global node IDs in migrations
When building integrations that use either the REST API or the GraphQL API, it's best practice to persist the global node ID so you can easily reference objects across API versions. For more information on handling the transition between REST and GraphQL, see "Migrating from REST to GraphQL."