mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-06-02 23:42:30 +02:00
27 lines
440 B
JavaScript
27 lines
440 B
JavaScript
module.exports.typeDefs = `
|
|
type AuthActions {
|
|
login (input: AuthLoginInput!): AuthLoginOutput!
|
|
}
|
|
|
|
input AuthLoginInput {
|
|
password: String!
|
|
}
|
|
|
|
type AuthLoginOutput {
|
|
result: AuthLoginResult
|
|
error: Error
|
|
}
|
|
|
|
type AuthLoginResult {
|
|
accessToken: String!
|
|
}
|
|
`
|
|
|
|
module.exports.resolvers = {
|
|
AuthActions: {
|
|
login (root, args, { dispatch }) {
|
|
return dispatch('api/auth/login', args.input)
|
|
}
|
|
}
|
|
}
|