Skip to content

Commit

Permalink
- Added isPledgeOverTimeAllowed to graphql layer (#2188)
Browse files Browse the repository at this point in the history
Added isPledgeOverTimeAllowed to fullProject and projectCard on fragments.graphql and to the respective GraphQLTransformers
  • Loading branch information
jlplks authored Dec 10, 2024
1 parent 0482474 commit 72537c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/graphql/fragments.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ fragment projectCard on Project {
backersCount
description
isLaunched
isPledgeOverTimeAllowed
backing {
id
}
Expand Down Expand Up @@ -56,6 +57,7 @@ fragment fullProject on Project {
description
minPledge
isLaunched
isPledgeOverTimeAllowed
sendMetaCapiEvents
sendThirdPartyEvents
backing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ fun projectTransformer(projectFragment: FullProject?): Project {
val goal = projectFragment?.goal?.amount?.amount?.toDouble() ?: 0.0
val id = decodeRelayId(projectFragment?.id) ?: -1
val isBacking = projectFragment?.backing?.backing?.let { true } ?: false
val isPledgeOverTimeAllowed = projectFragment?.isPledgeOverTimeAllowed ?: false
val isStarred = projectFragment?.isWatched ?: false
val launchedAt = projectFragment?.launchedAt
val location = locationTransformer(projectFragment?.location?.location)
Expand Down Expand Up @@ -403,6 +404,7 @@ fun projectTransformer(projectFragment: FullProject?): Project {
.goal(goal)
.id(id)
.isBacking(isBacking)
.isPledgeOverTimeAllowed(isPledgeOverTimeAllowed)
.isStarred(isStarred)
.lastUpdatePublishedAt(updatedAt)
.launchedAt(launchedAt)
Expand Down Expand Up @@ -560,6 +562,7 @@ fun projectTransformer(projectFragment: ProjectCard?): Project {
val goal = projectFragment?.goal?.amount?.amount?.toDouble() ?: 0.0
val id = decodeRelayId(projectFragment?.id) ?: -1
val isBacking = projectFragment?.backing?.id?.let { true } ?: false
val isPledgeOverTimeAllowed = projectFragment?.isPledgeOverTimeAllowed ?: false
val isStarred = projectFragment?.isWatched ?: false
val launchedAt = projectFragment?.launchedAt
val location = locationTransformer(projectFragment?.location?.location)
Expand Down Expand Up @@ -596,6 +599,7 @@ fun projectTransformer(projectFragment: ProjectCard?): Project {
.goal(goal)
.id(id)
.isBacking(isBacking)
.isPledgeOverTimeAllowed(isPledgeOverTimeAllowed)
.isStarred(isStarred)
.launchedAt(launchedAt)
.location(location)
Expand Down

0 comments on commit 72537c3

Please sign in to comment.