123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- 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
- }
- }
- `
- const BLOCKS = gql`
- query BLOCKS {
- blocks {
- sequence
- title
- duration
- variation
- format {
- name
- description
- }
- tracks {
- title
- artist
- duration
- link
- }
- exercise {
- name
- description
- video
- targets
- baseExercise {
- name
- }
- }
- description
- }
- }
- `
- const CREATE_BLOCK = gql`
- mutation CREATE_BLOCK($sequence: Int!, $title: String!, $duration: Int!, $variation: String, $format: ID, $tracks: [ID]!, $exercises: [ID]!, $description: String!) {
- createBlock(sequence: $sequence, title: $title, duration: $duration, variation: $variation, format: $format, tracks: $tracks, exercises: $exercises, description: $description) {
- id
- }
- }
- `
- export {
- USER_LOGIN, USER_LOGOUT, USER_SIGNUP, CURRENT_USER,
- TRAINING, TRAININGS, CREATE_TRAINING,
- TRAINING_TYPES, CREATE_TRAINING_TYPE,
- BLOCKS, CREATE_BLOCK
- }
|