1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import gql from 'graphql-tag'
- const USER_LOGIN = gql`
- mutation USER_LOGIN($email: String!, $password: String!) {
- login(email: $email, password: $password) {
- id
- email
- name
- }
- }
- `
- const USER_LOGOUT = gql`
- mutation USER_LOGOUT {
- logout
- }
- `
- const USER_SIGNUP = gql`
- mutation USER_SIGNUP($email: String!, $password: String!, $name: String!) {
- signup(email: $email, password: $password, name: $name) {
- id
- email
- name
- }
- }
- `
- const CURRENT_USER = gql`
- query {
- me {
- id
- email
- name
- }
- }
- `
- const TRAINING = gql`
- query TRAINING($id: ID!){
- training(id: $id) {
- id
- title
- type {
- name
- description
- }
- createdAt
- trainingDate
- location
- registration {
- id
- }
- attendance
- }
- }
- `
- const TRAININGS = gql`
- query TRAININGS {
- trainings {
- id
- title
- trainingDate
- }
- }
- `
- const CREATE_TRAINING = gql`
- mutation CREATE_TRAINING($title: String!, $trainingDate: DateTime!) {
- createTraining (title: $title, trainingDate: $trainingDate) {
- id
- }
- }
- `
- export {
- USER_LOGIN, USER_LOGOUT, USER_SIGNUP, CURRENT_USER,
- TRAINING, TRAININGS, CREATE_TRAINING
- }
|