mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-02-06 09:55:50 +00:00
This commit takes all backend changes for signup and invite feature. I was working on these features and removed the generated mutations for type user along the way.
18 lines
467 B
JavaScript
18 lines
467 B
JavaScript
import { request } from 'graphql-request'
|
|
|
|
// this is the to-be-tested server host
|
|
// not to be confused with the seeder host
|
|
export const host = 'http://127.0.0.1:4123'
|
|
|
|
export async function login(variables) {
|
|
const mutation = `
|
|
mutation($email: String!, $password: String!) {
|
|
login(email: $email, password: $password)
|
|
}
|
|
`
|
|
const response = await request(host, mutation, variables)
|
|
return {
|
|
authorization: `Bearer ${response.login}`,
|
|
}
|
|
}
|