younifyd
Menu

role

Find a Role entity.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the role action (under Role).
  3. Fill in the fields below, then reference the result from later steps as {{role.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query Role($name: String!) {
  role(name: $name) {
    id
    name
    permissions {
      name
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

namestringrequired

Name of the role which is unique and acts as a key to identify the role itself

json
{
  "name": "string"
}

Response

Read the result with {{role.response.data.data.role}}. If the API returns errors, the step fails and they are at {{role.response.data.errors}}.

idstring
namestring
permissionsarray<object>
nameobject

Need more? See the Fluent Commerce guide for connection setup and behaviour shared by every action.

Was this page helpful?