Update a user's list of frequently accessed pipes for quick access

Before You Begin

🔗 Use the GraphQL Playground to execute the mutations in this guide.

➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.

Prerequisites

  1. Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
  2. Permissions: Ensure your token has user modification privileges.
  3. Pipe IDs: Identify the pipes to mark as favorites.

Step 1: Find Pipe IDs

Via Pipefy UI

  1. Open the Pipe in your browser.
  2. The URL contains the Pipe ID: https://app.pipefy.com/pipes/123456789.
  3. Pipe ID = 123456789 (number after /pipes/).

Via GraphQL Query

Step 2: Execute the Mutation

Update favorite pipes using the setFavoritePipes mutation:

mutation {
  setFavoritePipes(input: {
    pipeIds: [123, 456]
  }) {
    success
  }
}

Arguments Breakdown

  • pipeIds: Array of pipe IDs to mark as favorites. Pass an empty array [] to clear all favorites.

Example Responses

Success Case:

{
  "data": {
    "setFavoritePipes": {
      "success": true
    }
  }
}

Use Case Scenarios

  1. Onboarding Workflow:

    # Set initial favorites for new users
    mutation {
      setFavoritePipes(input: {pipeIds: [123, 456]}) {
        success
      }
    }
    
  2. Reset Preferences:

    # Clear all favorites
    mutation {
      setFavoritePipes(input: {pipeIds: []}) {
        success
      }
    }
    
  3. Update Frequent Pipes:

    # Replace existing favorites
    mutation {
      setFavoritePipes(input: {pipeIds: [456, 789]}) {
        success
      }
    }
    

Key Notes

  • Idempotent Operation: Repeating the same request won't change the outcome.
  • Immediate Sync: Changes reflect instantly in the user's interface.
  • Validation: Invalid pipe IDs are silently ignored; only valid IDs are stored.

⚠️

Permissions Required

Users can only modify their own favorites.