Menu
Strapql LogoStrapql LogoStrapqlDocsBlog
GitHub
๐ŸŒœ
๐ŸŒž
Strapql LogoStrapql LogoStrapql
  • Docs
  • Blog
  • GitHub
  • Introduction
    • What is Strapql ?
  • Queries
    • ๐Ÿ™‹ Me Query
    • ๐Ÿง‘ Retrieve/Fetch a single User
    • ๐Ÿ‘ฅ Retrieve/Fetch all Users
    • ๐Ÿ“ฎ Fetch/Retrieve a single entry in collection type
    • ๐Ÿ“’ Fetch/Retrieve all entries in collection type
    • ๐Ÿ“‚ Get all files
    • ๐Ÿ‘จโ€๐Ÿ’ป Fetch a single role
    • ๐Ÿ‘จโ€๐Ÿ’ป ๐Ÿ‘จโ€๐Ÿ’ผ Fetch all roles
  • Mutations
    • ๐Ÿ”’ Register and Login
    • Create a User
    • ๐Ÿ”„ Update a User
    • โŒ Delete/Remove a User
    • ๐Ÿ†• Create an Entry in a Collection Type
    • ๐Ÿ”„ Update an entry in collection type
    • โŒ Delete/Remove an entry in collection type
    • ๐Ÿ“ค ๐Ÿ–ผ๏ธ Upload a single image
    • ๐Ÿ“ค ๐Ÿ–ผ๏ธ Upload a single image in separate fields

๐Ÿ‘จโ€๐Ÿ’ป Fetch a single role

Here is the query to display a single role :

query fetchSingleRole($id: ID!) {
role(id: $id) {
id
name
description
type
permissions {
id
type
controller
action
enabled
policy
role {
name
}
}
users {
id
createdAt
updatedAt
username
email
provider
confirmed
blocked
role {
name
}
}
}
}

Variable :

{
"id": "ROLE_ID"
}
Edit this page
Previous
ยซ ๐Ÿ“‚ Get all files
Next
๐Ÿ‘จโ€๐Ÿ’ป ๐Ÿ‘จโ€๐Ÿ’ผ Fetch all roles ยป

Docs

  • Get Started

Community

  • Discord
  • Strapi Forum
  • YouTube
  • Stack Overflow
  • Twitter

More

  • Blog
  • GitHub
Copyright ยฉ 2022 Strapql, Built with โค๏ธ by kevin.