1
Fork 0
photoview/api/graphql/schema.graphql

36 lines
568 B
GraphQL
Raw Normal View History

2020-01-31 23:30:34 +01:00
directive @isAdmin on FIELD_DEFINITION
2020-01-31 18:51:24 +01:00
scalar Time
2020-01-30 14:28:14 +01:00
type Query {
2020-01-31 23:30:34 +01:00
users: [User!]! @isAdmin
myUser: User
2020-01-30 14:28:14 +01:00
}
type Mutation {
authorizeUser(username: String!, password: String!): AuthorizeResult!
2020-01-31 18:51:24 +01:00
registerUser(
username: String!
password: String!
rootPath: String!
): AuthorizeResult!
2020-01-30 14:28:14 +01:00
}
type AuthorizeResult {
success: Boolean!
status: String!
token: String
}
type User {
id: ID!
username: String!
#albums: [Album]
# Local filepath for the user's photos
2020-01-31 23:30:34 +01:00
rootPath: String! @isAdmin
2020-01-30 14:28:14 +01:00
admin: Boolean!
#shareTokens: [ShareToken]
}