NYYU Logo
APIDeposit

Change Deposit Show Status

Toggle visibility of deposit transactions across PayPal, Stripe, and Bank deposit types

๐Ÿ‘๏ธ

Change Deposit Show Status

Toggle visibility of deposit transactions across PayPal, Stripe, and Bank deposit types

Overview

These mutations allow users to change the show status of their deposit transactions across different payment methods (PayPal, Stripe, and Bank). This feature enables users to organize their transaction history by hiding or showing specific deposits without permanently deleting them.

๐Ÿ“‹ Available Mutations

Three mutations are available, one for each deposit transaction type:

  • โ€ข changePayPalDepositShowStatus - For PayPal deposits

  • โ€ข changeStripeDepositShowStatus - For Stripe deposits

  • โ€ข changeBankDepositShowStatus - For Bank deposits


PayPal Deposit Show Status

๐Ÿ”ง Mutation Schema

changePayPalDepositShowStatus(
  id: Int!,
  showStatus: Int!
): Int

Parameters

idRequired

Type: Int

The ID of the PayPal deposit transaction to update.

showStatusRequired

Type: Int

The new show status: 0 to hide, 1 to show.

Example Usage

mutation {
  changePayPalDepositShowStatus(
    id: 123,
    showStatus: 1
  )
}

Example Response

{
  "data": {
    "changePayPalDepositShowStatus": 1
  }
}

Stripe Deposit Show Status

๐Ÿ”ง Mutation Schema

changeStripeDepositShowStatus(
  id: Int!,
  showStatus: Int!
): Int

Parameters

idRequired

Type: Int

The ID of the Stripe deposit transaction to update.

showStatusRequired

Type: Int

The new show status: 0 to hide, 1 to show.

Example Usage

mutation {
  changeStripeDepositShowStatus(
    id: 456,
    showStatus: 0
  )
}

Example Response

{
  "data": {
    "changeStripeDepositShowStatus": 0
  }
}

Bank Deposit Show Status

๐Ÿ”ง Mutation Schema

changeBankDepositShowStatus(
  id: Int!,
  showStatus: Int!
): Int

Parameters

idRequired

Type: Int

The ID of the bank deposit transaction to update.

showStatusRequired

Type: Int

The new show status: 0 to hide, 1 to show.

Example Usage

mutation {
  changeBankDepositShowStatus(
    id: 789,
    showStatus: 1
  )
}

Example Response

{
  "data": {
    "changeBankDepositShowStatus": 1
  }
}

Show Status Values

Status Value Reference

0
Hidden

Transaction is hidden from view

1
Visible

Transaction is visible in queries

Use Cases

๐Ÿ—‚๏ธ

Transaction Organization

Allow users to organize their transaction history by hiding old or irrelevant deposits.

๐Ÿงน

Clean Interface

Reduce clutter in transaction lists while preserving data for future reference.

๐Ÿ”

Privacy Control

Give users control over which transactions are visible in their transaction history.

โ†ฉ๏ธ

Reversible Hiding

Unlike deletion, hidden transactions can be easily restored by changing the status back to visible.

Important Notes

Non-Destructive Operation

Changing the show status does not delete the transaction. Hidden transactions are still stored in the database and can be retrieved by setting the showStatus back to 1. This is useful for temporary organization without losing transaction history.

Query Filtering

When querying transactions, you'll need to specify the showStatus parameter to retrieve hidden transactions. By default, queries typically return only visible transactions (showStatus = 1).

Integration Example

Complete Workflow Example

Step 1: Hide a Transaction

mutation {
changePayPalDepositShowStatus(id: 123, showStatus: 0)
}

Step 2: Query Visible Transactions (Hidden transaction won't appear)

query {
getPaypalDepositTxnsByUser(showStatus: 1) {
  id
  amount
  status
}
}

Step 3: Restore the Transaction

mutation {
changePayPalDepositShowStatus(id: 123, showStatus: 1)
}

๐Ÿ’ก Best Practices

  • โ€ขProvide a clear UI toggle for users to easily hide/show transactions
  • โ€ขConsider adding a "Hidden Transactions" view where users can manage hidden items
  • โ€ขShow a confirmation dialog before hiding transactions to prevent accidental hiding
  • โ€ขDisplay a counter or indicator showing how many transactions are currently hidden
  • โ€ขImplement batch operations to hide/show multiple transactions at once

PayPal Transactions

Query PayPal deposits with status filter

getPaypalDepositTxnsByUser

Stripe Transactions

Query Stripe deposits with status filter

getStripeDepositTxnsByUser

Bank Transactions

Query bank deposits with status filter

getBankDepositTxnsByUser