-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve non-nullables in responses
- Loading branch information
Showing
20 changed files
with
115 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
query UserIdQuery { | ||
viewer: Viewer { | ||
id | ||
Viewer @nonnull { | ||
id @nonnull | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
common/user/data/src/commonMain/graphql/QueryUserInfo.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
features/lists/data/src/commonMain/graphql/FragmentMediaEntry.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 9 additions & 12 deletions
21
features/lists/data/src/commonMain/graphql/QueryMediaListCollection.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
...a/src/commonMain/kotlin/dev/alvr/katana/features/lists/data/mappers/requests/mediaList.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
package dev.alvr.katana.features.lists.data.mappers.requests | ||
|
||
import com.apollographql.apollo3.api.Optional | ||
import dev.alvr.katana.features.lists.data.MediaListEntriesMutation | ||
import dev.alvr.katana.features.lists.domain.models.lists.MediaList | ||
|
||
internal fun MediaList.toMutation() = MediaListEntriesMutation( | ||
id = id, | ||
score = Optional.presentIfNotNull(score), | ||
progress = Optional.presentIfNotNull(progress), | ||
progressVolumes = Optional.presentIfNotNull(progressVolumes), | ||
repeat = Optional.presentIfNotNull(repeat), | ||
private = Optional.presentIfNotNull(private), | ||
notes = Optional.presentIfNotNull(notes), | ||
hiddenFromStatusLists = Optional.presentIfNotNull(hiddenFromStatusLists), | ||
startedAt = Optional.presentIfNotNull(startedAt.toFuzzyDate().takeIfValid()), | ||
completedAt = Optional.presentIfNotNull(completedAt.toFuzzyDate().takeIfValid()), | ||
score = score, | ||
progress = progress, | ||
progressVolumes = progressVolumes, | ||
repeat = repeat, | ||
private = private, | ||
notes = notes, | ||
hiddenFromStatusLists = hiddenFromStatusLists, | ||
startedAt = startedAt.toFuzzyDate().takeIfValid(), | ||
completedAt = completedAt.toFuzzyDate().takeIfValid(), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
...src/commonMain/kotlin/dev/alvr/katana/features/lists/data/mappers/responses/mediaEntry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.