Giveth / impact-graph

MIT License
49 stars 18 forks source link

Endpoint for Archiving Recurring Donation #1399

Closed divine-comedian closed 5 months ago

divine-comedian commented 8 months ago

When a user wants to archive or end their recurring donation we should update the status on the back-end of this recurring donation to archived. We need an endpoint that can be used on the front-end to change the status of a recurring donation to 'archived' - will need https://github.com/Giveth/impact-graph/issues/1400 to have statuses in place/

When this recurring donation has status of archived we no longer show it on my profile page for user.

image

divine-comedian commented 8 months ago
export const updateRecurringDonationQuery = `
       mutation (
        $projectId: Int!,
        $networkId: Int!,
        $currency: String!,
        $txHash: String
        $flowRate: String
        $anonymous: Boolean
        $status: String
        ) {
          updateRecurringDonationParams(
            projectId: $projectId
            networkId: $networkId
            currency:$currency
            txHash:$txHash
            anonymous:$anonymous
            flowRate:$flowRate
            status:$status
        ) {
            txHash
            networkId
            currency
            flowRate
            anonymous
            status
          }
      }
`;

Needs projectId, networkId currency & status. Send status as ended to end recurring donation in DB @MohammadPCh

maryjaf commented 7 months ago

I had tested the "end recurring donation"scenarios and the status is changed correctly from ended to archive

jainkrati commented 5 months ago

can we close this as done @maryjaf ?