Files
omnivore/apple/OmnivoreKit/Sources/Services/DataService/Selections/UserProfileSelection.swift
2022-12-06 13:35:46 +08:00

19 lines
435 B
Swift

import Models
import SwiftGraphQL
let profileSelection = Selection.Profile {
(
username: try $0.username(),
profileImageURL: try $0.pictureUrl()
)
}
let userProfileSelection = Selection.User {
InternalUserProfile(
userID: try $0.id(),
name: try $0.name(),
username: try $0.profile(selection: profileSelection).username,
profileImageURL: try $0.profile(selection: profileSelection).profileImageURL
)
}