Tutorials

Practical queries to get you started — copy, paste and explore

This section provides example GraphQL operations for common tasks. You can execute these directly in the API Playground.

Note: Authentication is not covered here. Please refer to the Authentication guide for details on how to obtain and use access tokens.

Retrieve the Current User’s Identity

The following query fetches basic account details for the authenticated user. Starting at the root query node, it requests the user’s primary key (pk), username, and email address.

Required Scopes

  • user:read

Example Query

query {
  user {
    pk
    username
    email
  }
}

Example Response

{
  "data": {
    "user": {
      "pk": 783350,
      "username": "joealcorn",
      "email": "joe.alcorn@marvelapp.com"
    }
  }
}