Update gql types and mutations

This commit is contained in:
Hazem Krimi
2021-04-29 19:09:51 +01:00
parent 76ef244d55
commit 0b4d27f398
2 changed files with 258 additions and 26 deletions
+39 -20
View File
@@ -1,26 +1,8 @@
import gql from 'graphql-tag';
export const SIGNUP = gql`
mutation Signup(
$email: String!
$password: String!
$firstName: String!
$lastName: String!
$phone: PhoneInputModel!
$address: AddressInputModel!
$active: Boolean!
$role: Role!
) {
signup(
email: $email
password: $password
firstName: $firstName
lastName: $lastName
phone: $phone
address: $address
active: $active
role: $role
) {
mutation Signup($email: String!, $password: String!) {
signup(email: $email, password: $password) {
user {
id
email
@@ -115,3 +97,40 @@ export const CONFIRM_USER_RESET_PASSWORD = gql`
}
}
`;
export const UPDATE_USER_INFO = gql`
mutation UpdateUserInfo(
$id: String!
$email: String!
$firstName: String!
$lastName: String!
$phone: PhoneInputModel!
$address: AddressInputModel!
) {
updateUserInfo(
id: $id
email: $email
firstName: $firstName
lastName: $lastName
phone: $phone
address: $address
) {
id
email
firstName
lastName
phone {
prefix
number
}
address {
place
city
country
zip
}
active
role
}
}
`;