the-deep / server

Server for DEEP
https://app.thedeep.io/
GNU Affero General Public License v3.0
9 stars 3 forks source link

Implement graphql mutation node for project stats summary #1438

Open sudan45 opened 5 months ago

sudan45 commented 5 months ago

Problem Statement

The 'projects stats summary' features uses a Rest API.

Acceptance Criteria

The 'projects stats summary' feature works with a Graphql mutation.

Existing

https://github.com/the-deep/server/blob/bbfdef24fa80f04a046cca7f957297adc534ba15/apps/project/views.py#L702-L746 This existing api doesnot Include any serializer.

Purpose

Expected Response type

type ProjectSummaryStatEntryActivityType {
  projectId: ID
  count: Int
  date: Date
}

type ProjectSummaryStatType {
  projectsCount: Int
  totalLeadsCount: Int
  totalLeadsTaggedCount: Int
  totalLeadsTaggedAndControlledCount: Int
  recentEntriesActivities: [ProjectSummaryStatEntryActivityType!]
}