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 type { name description } content { title } trainingDate location registration { name } attendance ratings { value } published } } ` const TRAINING_TYPES = gql` query TRAINING_TYPES { trainingTypes { id name description } } ` const CREATE_TRAINING = gql` mutation CREATE_TRAINING($title: String!, $trainingDate: DateTime!) { createTraining (title: $title, trainingDate: $trainingDate) { id } } ` const CREATE_TRAINING_TYPE = gql` mutation CREATE_TRAINING_TYPE($name: String!, $description: String!) { createTrainingType (name: $name, description: $description) { id } } ` export { USER_LOGIN, USER_LOGOUT, USER_SIGNUP, CURRENT_USER, TRAINING, TRAININGS, CREATE_TRAINING, TRAINING_TYPES, CREATE_TRAINING_TYPE }