mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Change login call from query to mutation.
This commit is contained in:
parent
e844bcc925
commit
f63bfa871a
@ -136,3 +136,21 @@ export const createContributionMessage = gql`
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const login = gql`
|
||||
mutation($email: String!, $password: String!, $publisherId: Int) {
|
||||
login(email: $email, password: $password, publisherId: $publisherId) {
|
||||
email
|
||||
firstName
|
||||
lastName
|
||||
language
|
||||
klickTipp {
|
||||
newsletterState
|
||||
}
|
||||
hasElopage
|
||||
publisherId
|
||||
isAdmin
|
||||
creation
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
@ -1,23 +1,5 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const login = gql`
|
||||
query($email: String!, $password: String!, $publisherId: Int) {
|
||||
login(email: $email, password: $password, publisherId: $publisherId) {
|
||||
email
|
||||
firstName
|
||||
lastName
|
||||
language
|
||||
klickTipp {
|
||||
newsletterState
|
||||
}
|
||||
hasElopage
|
||||
publisherId
|
||||
isAdmin
|
||||
creation
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const verifyLogin = gql`
|
||||
query {
|
||||
verifyLogin {
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
import InputPassword from '@/components/Inputs/InputPassword'
|
||||
import InputEmail from '@/components/Inputs/InputEmail'
|
||||
import Message from '@/components/Message/Message'
|
||||
import { login } from '@/graphql/queries'
|
||||
import { login } from '@/graphql/mutations'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
@ -71,14 +71,13 @@ export default {
|
||||
container: this.$refs.submitButton,
|
||||
})
|
||||
this.$apollo
|
||||
.query({
|
||||
query: login,
|
||||
.mutate({
|
||||
mutation: login,
|
||||
variables: {
|
||||
email: this.form.email,
|
||||
password: this.form.password,
|
||||
publisherId: this.$store.state.publisherId,
|
||||
},
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
.then(async (result) => {
|
||||
const {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user