This commit is contained in:
2021-02-04 15:31:07 -05:00
parent 082f923482
commit a5692babb8
20 changed files with 319 additions and 348 deletions

View File

@@ -5,6 +5,7 @@ scalar Upload
# https://gqlgen.com/reference/directives/
directive @hasMinRole(role: Role!) on FIELD_DEFINITION
directive @isPrivate on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
directive @meta(
gorm: String,
@@ -41,9 +42,9 @@ enum AuthResult {
}
type AuthResponse {
Result: AuthResult!
Device: Device
Error: String
result: AuthResult!
device: Device
error: String
}
# ------------------------------------------------------------
@@ -146,7 +147,7 @@ type Device {
type: DeviceType! @meta(gorm: "default:Unknown;not null")
userID: ID! @meta(gorm: "not null")
user: User! @meta(gorm: "foreignKey:ID;references:UserID;not null")
refreshKey: String
refreshKey: String @isPrivate
}
type User {
@@ -159,7 +160,7 @@ type User {
lastName: String
role: Role! @meta(gorm: "default:User;not null")
authType: AuthType! @meta(gorm: "default:Local;not null")
password: String
password: String @isPrivate
}
type MediaItem {