Skip to content

Commit a6bf05c

Browse files
committed
Removing some type alias statements in the GetCoursesProgressionRequest to prevent hitting a limit on our graphql server
1 parent f378616 commit a6bf05c

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

Core/Core/Features/Courses/CourseProgression/CDCourse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public final class CDCourse: NSManagedObject, WriteableModel {
133133
model.nextModuleID = node?.id
134134
model.nextModuleItemID = firstItem.content?.id
135135
model.nextModuleItemEstimatedTime = firstItem.estimatedDuration
136-
model.nextModuleItemType = firstItem.content?.type
136+
model.nextModuleItemType = firstItem.content?.__typename
137137
model.nextModuleItemDueDate = firstItem.content?.dueAt
138138
model.nextModuleName = node?.name
139139
model.nextModuleItemURL = firstItem.url
@@ -153,7 +153,7 @@ public final class CDCourse: NSManagedObject, WriteableModel {
153153
model.nextModuleID = nextModule?.id
154154
model.nextModuleItemID = nextModuleItem?.id
155155
model.nextModuleItemEstimatedTime = nextModuleItem?.estimatedDuration
156-
model.nextModuleItemType = nextModuleItem?.content?.type
156+
model.nextModuleItemType = nextModuleItem?.content?.__typename
157157
model.nextModuleItemDueDate = nextModuleItem?.content?.dueAt
158158
model.nextModuleName = nextModule?.name
159159
model.nextModuleItemURL = nextModuleItem?.url

Core/Core/Features/Courses/CourseProgression/GetCoursesProgressionRequest.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,47 +62,47 @@ public struct GetCoursesProgressionRequest: APIGraphQLRequestable {
6262
id
6363
title
6464
dueAt
65-
type: __typename
65+
__typename
6666
}
6767
... on Discussion {
6868
id
6969
title
70-
type: __typename
70+
__typename
7171
}
7272
... on ExternalTool {
7373
id: _id
7474
title: name
75-
type: __typename
75+
__typename
7676
}
7777
... on ExternalUrl {
7878
id: _id
7979
title
80-
type: __typename
80+
__typename
8181
}
8282
... on File {
8383
id
8484
title
85-
type: __typename
85+
__typename
8686
}
8787
... on ModuleExternalTool {
8888
id: _id
8989
title
90-
type: __typename
90+
__typename
9191
}
9292
... on Page {
9393
id
9494
title
95-
type: __typename
95+
__typename
9696
}
9797
... on Quiz {
9898
id
9999
title
100-
type: __typename
100+
__typename
101101
}
102102
... on SubHeader {
103103
id: title
104104
title
105-
type: __typename
105+
__typename
106106
}
107107
}
108108
}
@@ -133,48 +133,48 @@ public struct GetCoursesProgressionRequest: APIGraphQLRequestable {
133133
title
134134
dueAt
135135
position
136-
type: __typename
136+
__typename
137137
}
138138
... on Discussion {
139139
id
140140
title
141141
position
142-
type: __typename
142+
__typename
143143
}
144144
... on ExternalTool {
145145
id: _id
146146
title: name
147-
type: __typename
147+
__typename
148148
}
149149
... on ExternalUrl {
150150
id: _id
151151
title
152-
type: __typename
152+
__typename
153153
}
154154
... on File {
155155
id
156156
title
157-
type: __typename
157+
__typename
158158
}
159159
... on ModuleExternalTool {
160160
id: _id
161161
title
162-
type: __typename
162+
__typename
163163
}
164164
... on Page {
165165
id
166166
title
167-
type: __typename
167+
__typename
168168
}
169169
... on Quiz {
170170
id
171171
title
172-
type: __typename
172+
__typename
173173
}
174174
... on SubHeader {
175175
id: title
176176
title
177-
type: __typename
177+
__typename
178178
}
179179
}
180180
}

Core/Core/Features/Courses/CourseProgression/GetCoursesProgressionResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public struct GetCoursesProgressionResponse: Codable {
100100
struct Content: Codable {
101101
let id: String?
102102
let title: String?
103-
let type: String?
103+
let __typename: String?
104104
let dueAt: Date?
105105
}
106106
}
@@ -127,6 +127,6 @@ public struct GetCoursesProgressionResponse: Codable {
127127
public let title: String?
128128
public let dueAt: Date?
129129
public let position: Double?
130-
public let type: String?
130+
public let __typename: String?
131131
}
132132
}

0 commit comments

Comments
 (0)