feat: 411 add available paid plans resolver#181
Conversation
Codecov Report
@@ Coverage Diff @@
## main #181 +/- ##
=======================================
+ Coverage 95.46 95.53 +0.07
=======================================
Files 714 714
Lines 15314 15551 +237
=======================================
+ Hits 14619 14856 +237
Misses 695 695
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
==========================================
+ Coverage 95.56% 95.63% +0.07%
==========================================
Files 599 599
Lines 14913 15150 +237
==========================================
+ Hits 14251 14489 +238
+ Misses 662 661 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report
@@ Coverage Diff @@
## main #181 +/- ##
==========================================
+ Coverage 95.56% 95.63% +0.07%
==========================================
Files 599 599
Lines 14913 15150 +237
==========================================
+ Hits 14251 14489 +238
+ Misses 662 661 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| plan_service.trial_status == TrialStatus.ONGOING.value | ||
| or plan_service.trial_status == TrialStatus.EXPIRED.value | ||
| or plan_service.plan_name in LITE_PLAN_REPRESENTATIONS | ||
| ) and plan_service.plan_user_count <= 10: |
There was a problem hiding this comment.
It would be better to put the 10 into constants file
| ownerid: Int! | ||
| plan: Plan | ||
| pretrialPlan: PlanRepresentation | ||
| availablePlans: [PlanRepresentation!]! |
There was a problem hiding this comment.
What's the difference between [PlanRepresentation!]! and [PlanRepresentation]!?
| self.trial_status == TrialStatus.ONGOING.value | ||
| or self.trial_status == TrialStatus.EXPIRED.value | ||
| or self.plan_name in LITE_PLAN_REPRESENTATIONS | ||
| ) and self.plan_user_count <= 10: |
…ailable-paid-plans-resolver
…vailable-paid-plans-resolver
Purpose/Motivation
We want to surface the plans available to a customer based on some parameters. This is adding a resolver to expose that information. This resolver mimics a function shown in via a REST endpoint, with the intent to transition to gql only.
This is not the final version of this change, as I want some input on how to keep parity with this very similar function, https://github.com/codecov/codecov-api/blob/main/billing/helpers.py#L23. There's two main differences with this and the newly added resolver: (Edit: these have been addressed)
What does this PR do?
availablePlansresolver to an owneravailable_plansfunction to include lite plansLegal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.