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'
|
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`
|
export const verifyLogin = gql`
|
||||||
query {
|
query {
|
||||||
verifyLogin {
|
verifyLogin {
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
import InputPassword from '@/components/Inputs/InputPassword'
|
import InputPassword from '@/components/Inputs/InputPassword'
|
||||||
import InputEmail from '@/components/Inputs/InputEmail'
|
import InputEmail from '@/components/Inputs/InputEmail'
|
||||||
import Message from '@/components/Message/Message'
|
import Message from '@/components/Message/Message'
|
||||||
import { login } from '@/graphql/queries'
|
import { login } from '@/graphql/mutations'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
@ -71,14 +71,13 @@ export default {
|
|||||||
container: this.$refs.submitButton,
|
container: this.$refs.submitButton,
|
||||||
})
|
})
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.query({
|
.mutate({
|
||||||
query: login,
|
mutation: login,
|
||||||
variables: {
|
variables: {
|
||||||
email: this.form.email,
|
email: this.form.email,
|
||||||
password: this.form.password,
|
password: this.form.password,
|
||||||
publisherId: this.$store.state.publisherId,
|
publisherId: this.$store.state.publisherId,
|
||||||
},
|
},
|
||||||
fetchPolicy: 'network-only',
|
|
||||||
})
|
})
|
||||||
.then(async (result) => {
|
.then(async (result) => {
|
||||||
const {
|
const {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user