Generate the node id
The node id is a globally unique identifier of an object. It is needed when you call the GraphQL query and mutation. In this section, we will go through how to generate the node ID for calling the Admin GraphQL API.
The node id is an base64url encoded string with format of <NODE_TYPE>:<ID>.

Generate the user node id example

package main
import (
func main() {
rawStdEncoding := base64.StdEncoding.WithPadding(base64.NoPadding)
nodeID := rawStdEncoding.EncodeToString([]byte("User:97b1c929-842c-415c-a7df-6967efdda160"))
import base64
base64.urlsafe_b64encode(b'User:97b1c929-842c-415c-a7df-6967efdda160').replace(b'=', b'')

Fetch the user object example

The query:
query ($userID: ID!) {
node(id: $userID) {
... on User {
The variables:
Copy link
On this page
Generate the user node id example
Fetch the user object example