How to Use "self" to Refer to the Root Account in Canvas LMS GraphQL API

Dheeraj0650
Community Member

Hello Canvas Community,

I am transitioning from using the Canvas REST API to the GraphQL API and need some help with a specific functionality. In the REST API, I use the endpoint "GET /api/v1/accounts/:account_id/users" with "account_id" set to "self" to refer to the domain root account. This is helpful for fetching list of of users associated with this account.

I am looking for an equivalent way to use "self" or a similar construct in the GraphQL API to achieve the same result. My goal is to query users associated with this account without explicitly specifying the account ID.

Has anyone worked with similar queries in the GraphQL API, or can someone point me in the right direction? Any examples or guidance would be greatly appreciated!

Thank you

0 Likes