Skip to content
Last update: January 30, 2024

Role query

This connection allows you to get role by its name.

Arguments

Argument Description
roleName {String!} The name of the role

Possible returns

Possible return Description
RoleType The role's information and attributes.

Examples

1
2
3
4
5
6
7
{
  role(roleName: "Store administrator") {
    id
    name
    permissions
  }
}
{
  "data": {
    "role": {
      "id": "store-admin",
      "name": "Store administrator",
      "permissions": [
        "storefront:user:view",
        "storefront:user:create",
        "storefront:organization:view",
        "storefront:user:delete",
        "storefront:organization:edit",
        "storefront:user:edit",
        "storefront:user:invite",
        "storefront:order:view",
        "storefront:order:changestatus"
      ]
    }
  }
}