Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 9958e78

Browse files
authored
chore: Remove deprecated plan name field from plan and plan representation types (#1070)
1 parent f80d9d2 commit 9958e78

File tree

7 files changed

+9
-33
lines changed

7 files changed

+9
-33
lines changed

graphql_api/tests/test_owner.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -678,18 +678,18 @@ def test_owner_available_plans(self):
678678
query = """{
679679
owner(username: "%s") {
680680
availablePlans {
681-
planName
681+
value
682682
}
683683
}
684684
}
685685
""" % (current_org.username)
686686
data = self.gql_request(query, owner=current_org)
687687
assert data["owner"]["availablePlans"] == [
688-
{"planName": "users-basic"},
689-
{"planName": "users-pr-inappm"},
690-
{"planName": "users-pr-inappy"},
691-
{"planName": "users-teamm"},
692-
{"planName": "users-teamy"},
688+
{"value": "users-basic"},
689+
{"value": "users-pr-inappm"},
690+
{"value": "users-pr-inappy"},
691+
{"value": "users-teamm"},
692+
{"value": "users-teamy"},
693693
]
694694

695695
def test_owner_query_with_no_service(self):

graphql_api/tests/test_plan.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def test_owner_plan_data_when_trialing(self):
4949
trialStartDate
5050
trialTotalDays
5151
marketingName
52-
planName
5352
value
5453
tierName
5554
billingRate
@@ -75,7 +74,6 @@ def test_owner_plan_data_when_trialing(self):
7574
"trialStartDate": "2023-06-19T00:00:00",
7675
"trialTotalDays": None,
7776
"marketingName": "Developer",
78-
"planName": "users-trial",
7977
"value": "users-trial",
8078
"tierName": "pro",
8179
"billingRate": None,
@@ -107,7 +105,6 @@ def test_owner_plan_data_with_account(self):
107105
owner(username: "%s") {
108106
plan {
109107
marketingName
110-
planName
111108
value
112109
tierName
113110
billingRate
@@ -126,7 +123,6 @@ def test_owner_plan_data_with_account(self):
126123
data = self.gql_request(query, owner=self.current_org)
127124
assert data["owner"]["plan"] == {
128125
"marketingName": "Pro",
129-
"planName": "users-pr-inappy",
130126
"value": "users-pr-inappy",
131127
"tierName": "pro",
132128
"billingRate": "annually",

graphql_api/tests/test_plan_representation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def test_owner_pretrial_plan_data_when_trialing(self):
3535
owner(username: "%s") {
3636
pretrialPlan {
3737
marketingName
38-
planName
3938
value
4039
billingRate
4140
baseUnitPrice
@@ -48,7 +47,6 @@ def test_owner_pretrial_plan_data_when_trialing(self):
4847
data = self.gql_request(query, owner=current_org)
4948
assert data["owner"]["pretrialPlan"] == {
5049
"marketingName": "Developer",
51-
"planName": "users-basic",
5250
"value": "users-basic",
5351
"billingRate": None,
5452
"baseUnitPrice": 0,

graphql_api/types/plan/plan.graphql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ type Plan {
1111
isTrialPlan: Boolean!
1212
marketingName: String!
1313
monthlyUploadLimit: Int
14-
planName: String!
15-
@deprecated(
16-
reason: "Plan representations have used `value` for a while, making the frontend code hard to change"
17-
)
1814
planUserCount: Int
1915
pretrialUsersCount: Int
2016
tierName: String!

graphql_api/types/plan/plan.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ def resolve_marketing_name(plan_service: PlanService, info) -> str:
3939
return plan_service.marketing_name
4040

4141

42-
@plan_bindable.field("planName")
43-
def resolve_plan_name(plan_service: PlanService, info) -> str:
44-
return plan_service.plan_name
45-
46-
4742
@plan_bindable.field("value")
4843
def resolve_plan_name_as_value(plan_service: PlanService, info) -> str:
4944
return plan_service.plan_name
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
type PlanRepresentation {
2-
marketingName: String!
3-
planName: String!
4-
@deprecated(
5-
reason: "Plan representations have used `value` for a while, making the frontend code hard to change"
6-
)
7-
value: String!
8-
billingRate: String
92
baseUnitPrice: Int!
103
benefits: [String!]!
4+
billingRate: String
5+
marketingName: String!
116
monthlyUploadLimit: Int
7+
value: String!
128
}

graphql_api/types/plan_representation/plan_representation.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ def resolve_marketing_name(plan_data: PlanData, info) -> str:
1717
return plan_data.marketing_name
1818

1919

20-
@plan_representation_bindable.field("planName")
21-
def resolve_plan_name(plan_data: PlanData, info) -> str:
22-
return plan_data.value
23-
24-
2520
@plan_representation_bindable.field("value")
2621
def resolve_plan_value(plan_data: PlanData, info) -> str:
2722
return plan_data.value

0 commit comments

Comments
 (0)