36 lines
568 B
GraphQL
36 lines
568 B
GraphQL
directive @isAdmin on FIELD_DEFINITION
|
|
|
|
scalar Time
|
|
|
|
type Query {
|
|
users: [User!]! @isAdmin
|
|
|
|
myUser: User
|
|
}
|
|
|
|
type Mutation {
|
|
authorizeUser(username: String!, password: String!): AuthorizeResult!
|
|
|
|
registerUser(
|
|
username: String!
|
|
password: String!
|
|
rootPath: String!
|
|
): AuthorizeResult!
|
|
}
|
|
|
|
type AuthorizeResult {
|
|
success: Boolean!
|
|
status: String!
|
|
token: String
|
|
}
|
|
|
|
type User {
|
|
id: ID!
|
|
username: String!
|
|
#albums: [Album]
|
|
# Local filepath for the user's photos
|
|
rootPath: String! @isAdmin
|
|
admin: Boolean!
|
|
#shareTokens: [ShareToken]
|
|
}
|