|
@@ -63,6 +63,35 @@ export type BlockExercisesArgs = {
|
|
|
last?: Maybe<Scalars['Int']>
|
|
|
};
|
|
|
|
|
|
+export type BlockCreateInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ sequence: Scalars['Int'],
|
|
|
+ title: Scalars['String'],
|
|
|
+ description?: Maybe<Scalars['String']>,
|
|
|
+ duration?: Maybe<Scalars['Int']>,
|
|
|
+ rounds?: Maybe<Scalars['Int']>,
|
|
|
+ rest?: Maybe<Scalars['Int']>,
|
|
|
+ videos?: Maybe<BlockCreatevideosInput>,
|
|
|
+ pictures?: Maybe<BlockCreatepicturesInput>,
|
|
|
+ format: FormatCreateOneInput,
|
|
|
+ tracks?: Maybe<TrackCreateManyInput>,
|
|
|
+ blocks?: Maybe<BlockCreateManyInput>,
|
|
|
+ exercises?: Maybe<ExerciseInstanceCreateManyInput>,
|
|
|
+};
|
|
|
+
|
|
|
+export type BlockCreateManyInput = {
|
|
|
+ create?: Maybe<Array<BlockCreateInput>>,
|
|
|
+ connect?: Maybe<Array<BlockWhereUniqueInput>>,
|
|
|
+};
|
|
|
+
|
|
|
+export type BlockCreatepicturesInput = {
|
|
|
+ set?: Maybe<Array<Scalars['String']>>,
|
|
|
+};
|
|
|
+
|
|
|
+export type BlockCreatevideosInput = {
|
|
|
+ set?: Maybe<Array<Scalars['String']>>,
|
|
|
+};
|
|
|
+
|
|
|
export enum BlockOrderByInput {
|
|
|
IdAsc = 'id_ASC',
|
|
|
IdDesc = 'id_DESC',
|
|
@@ -240,6 +269,10 @@ export type BlockWhereInput = {
|
|
|
exercises_none?: Maybe<ExerciseInstanceWhereInput>,
|
|
|
};
|
|
|
|
|
|
+export type BlockWhereUniqueInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+};
|
|
|
+
|
|
|
export type Comment = Node & {
|
|
|
id: Scalars['ID'],
|
|
|
text: Scalars['String'],
|
|
@@ -473,12 +506,45 @@ export type Exercise = Node & {
|
|
|
baseExercise: Array<Scalars['String']>,
|
|
|
};
|
|
|
|
|
|
+export type ExerciseCreatebaseExerciseInput = {
|
|
|
+ set?: Maybe<Array<Scalars['String']>>,
|
|
|
+};
|
|
|
+
|
|
|
+export type ExerciseCreateInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ name: Scalars['String'],
|
|
|
+ description: Scalars['String'],
|
|
|
+ video: Scalars['String'],
|
|
|
+ targets?: Maybe<ExerciseCreatetargetsInput>,
|
|
|
+ baseExercise?: Maybe<ExerciseCreatebaseExerciseInput>,
|
|
|
+};
|
|
|
+
|
|
|
+export type ExerciseCreateOneInput = {
|
|
|
+ create?: Maybe<ExerciseCreateInput>,
|
|
|
+ connect?: Maybe<ExerciseWhereUniqueInput>,
|
|
|
+};
|
|
|
+
|
|
|
+export type ExerciseCreatetargetsInput = {
|
|
|
+ set?: Maybe<Array<Scalars['String']>>,
|
|
|
+};
|
|
|
+
|
|
|
export type ExerciseInstance = Node & {
|
|
|
id: Scalars['ID'],
|
|
|
exercise: Exercise,
|
|
|
repetitions?: Maybe<Scalars['Int']>,
|
|
|
};
|
|
|
|
|
|
+export type ExerciseInstanceCreateInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ repetitions?: Maybe<Scalars['Int']>,
|
|
|
+ exercise: ExerciseCreateOneInput,
|
|
|
+};
|
|
|
+
|
|
|
+export type ExerciseInstanceCreateManyInput = {
|
|
|
+ create?: Maybe<Array<ExerciseInstanceCreateInput>>,
|
|
|
+ connect?: Maybe<Array<ExerciseInstanceWhereUniqueInput>>,
|
|
|
+};
|
|
|
+
|
|
|
export enum ExerciseInstanceOrderByInput {
|
|
|
IdAsc = 'id_ASC',
|
|
|
IdDesc = 'id_DESC',
|
|
@@ -538,6 +604,10 @@ export type ExerciseInstanceWhereInput = {
|
|
|
exercise?: Maybe<ExerciseWhereInput>,
|
|
|
};
|
|
|
|
|
|
+export type ExerciseInstanceWhereUniqueInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+};
|
|
|
+
|
|
|
export type ExerciseWhereInput = {
|
|
|
/** Logical AND on all given filters. */
|
|
|
AND?: Maybe<Array<ExerciseWhereInput>>,
|
|
@@ -655,12 +725,36 @@ export type ExerciseWhereInput = {
|
|
|
video_not_ends_with?: Maybe<Scalars['String']>,
|
|
|
};
|
|
|
|
|
|
+export type ExerciseWhereUniqueInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+};
|
|
|
+
|
|
|
export type Format = Node & {
|
|
|
id: Scalars['ID'],
|
|
|
name: Scalars['String'],
|
|
|
description: Scalars['String'],
|
|
|
};
|
|
|
|
|
|
+export type FormatCreateInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ name: Scalars['String'],
|
|
|
+ description: Scalars['String'],
|
|
|
+};
|
|
|
+
|
|
|
+export type FormatCreateOneInput = {
|
|
|
+ create?: Maybe<FormatCreateInput>,
|
|
|
+ connect?: Maybe<FormatWhereUniqueInput>,
|
|
|
+};
|
|
|
+
|
|
|
+export enum FormatOrderByInput {
|
|
|
+ IdAsc = 'id_ASC',
|
|
|
+ IdDesc = 'id_DESC',
|
|
|
+ NameAsc = 'name_ASC',
|
|
|
+ NameDesc = 'name_DESC',
|
|
|
+ DescriptionAsc = 'description_ASC',
|
|
|
+ DescriptionDesc = 'description_DESC'
|
|
|
+}
|
|
|
+
|
|
|
export type FormatWhereInput = {
|
|
|
/** Logical AND on all given filters. */
|
|
|
AND?: Maybe<Array<FormatWhereInput>>,
|
|
@@ -751,6 +845,10 @@ export type FormatWhereInput = {
|
|
|
description_not_ends_with?: Maybe<Scalars['String']>,
|
|
|
};
|
|
|
|
|
|
+export type FormatWhereUniqueInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+};
|
|
|
+
|
|
|
export type Mutation = {
|
|
|
createUser: User,
|
|
|
updateUser?: Maybe<User>,
|
|
@@ -758,6 +856,7 @@ export type Mutation = {
|
|
|
createTraining: Training,
|
|
|
createTrainingType: TrainingType,
|
|
|
createBlock: Block,
|
|
|
+ createFormat: Format,
|
|
|
userLogin: User,
|
|
|
userLogout: Scalars['String'],
|
|
|
userSignup: User,
|
|
@@ -783,7 +882,13 @@ export type MutationDeleteUserArgs = {
|
|
|
|
|
|
|
|
|
export type MutationCreateTrainingArgs = {
|
|
|
- title: Scalars['String']
|
|
|
+ title: Scalars['String'],
|
|
|
+ type: TrainingTypeCreateOneInput,
|
|
|
+ trainingDate: Scalars['DateTime'],
|
|
|
+ location: Scalars['String'],
|
|
|
+ attendance: Scalars['Int'],
|
|
|
+ published: Scalars['Boolean'],
|
|
|
+ blocks: Array<BlockCreateInput>
|
|
|
};
|
|
|
|
|
|
|
|
@@ -805,6 +910,12 @@ export type MutationCreateBlockArgs = {
|
|
|
};
|
|
|
|
|
|
|
|
|
+export type MutationCreateFormatArgs = {
|
|
|
+ name: Scalars['String'],
|
|
|
+ description: Scalars['String']
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
export type MutationUserLoginArgs = {
|
|
|
email: Scalars['String'],
|
|
|
password: Scalars['String']
|
|
@@ -840,11 +951,13 @@ export enum Permission {
|
|
|
}
|
|
|
|
|
|
export type Query = {
|
|
|
- users: Array<Maybe<User>>,
|
|
|
+ users: Array<User>,
|
|
|
training?: Maybe<Training>,
|
|
|
- trainings: Array<Maybe<Training>>,
|
|
|
- trainingTypes: Array<Maybe<TrainingType>>,
|
|
|
- blocks: Array<Maybe<Block>>,
|
|
|
+ trainings: Array<Training>,
|
|
|
+ trainingType?: Maybe<TrainingType>,
|
|
|
+ trainingTypes: Array<TrainingType>,
|
|
|
+ blocks: Array<Block>,
|
|
|
+ formats: Array<Format>,
|
|
|
currentUser: User,
|
|
|
};
|
|
|
|
|
@@ -876,6 +989,11 @@ export type QueryTrainingsArgs = {
|
|
|
};
|
|
|
|
|
|
|
|
|
+export type QueryTrainingTypeArgs = {
|
|
|
+ where: TrainingTypeWhereUniqueInput
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
export type QueryTrainingTypesArgs = {
|
|
|
where?: Maybe<TrainingTypeWhereInput>,
|
|
|
orderBy?: Maybe<TrainingTypeOrderByInput>,
|
|
@@ -897,6 +1015,17 @@ export type QueryBlocksArgs = {
|
|
|
last?: Maybe<Scalars['Int']>
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+export type QueryFormatsArgs = {
|
|
|
+ where?: Maybe<FormatWhereInput>,
|
|
|
+ orderBy?: Maybe<FormatOrderByInput>,
|
|
|
+ skip?: Maybe<Scalars['Int']>,
|
|
|
+ after?: Maybe<Scalars['String']>,
|
|
|
+ before?: Maybe<Scalars['String']>,
|
|
|
+ first?: Maybe<Scalars['Int']>,
|
|
|
+ last?: Maybe<Scalars['Int']>
|
|
|
+};
|
|
|
+
|
|
|
export type Rating = Node & {
|
|
|
id: Scalars['ID'],
|
|
|
user: User,
|
|
@@ -1164,6 +1293,19 @@ export type Track = Node & {
|
|
|
link: Scalars['String'],
|
|
|
};
|
|
|
|
|
|
+export type TrackCreateInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ title: Scalars['String'],
|
|
|
+ artist: Scalars['String'],
|
|
|
+ duration: Scalars['Int'],
|
|
|
+ link: Scalars['String'],
|
|
|
+};
|
|
|
+
|
|
|
+export type TrackCreateManyInput = {
|
|
|
+ create?: Maybe<Array<TrackCreateInput>>,
|
|
|
+ connect?: Maybe<Array<TrackWhereUniqueInput>>,
|
|
|
+};
|
|
|
+
|
|
|
export enum TrackOrderByInput {
|
|
|
IdAsc = 'id_ASC',
|
|
|
IdDesc = 'id_DESC',
|
|
@@ -1309,6 +1451,10 @@ export type TrackWhereInput = {
|
|
|
link_not_ends_with?: Maybe<Scalars['String']>,
|
|
|
};
|
|
|
|
|
|
+export type TrackWhereUniqueInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+};
|
|
|
+
|
|
|
export type Training = Node & {
|
|
|
id: Scalars['ID'],
|
|
|
title: Scalars['String'],
|
|
@@ -1379,6 +1525,17 @@ export type TrainingType = Node & {
|
|
|
description: Scalars['String'],
|
|
|
};
|
|
|
|
|
|
+export type TrainingTypeCreateInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ name: Scalars['String'],
|
|
|
+ description: Scalars['String'],
|
|
|
+};
|
|
|
+
|
|
|
+export type TrainingTypeCreateOneInput = {
|
|
|
+ create?: Maybe<TrainingTypeCreateInput>,
|
|
|
+ connect?: Maybe<TrainingTypeWhereUniqueInput>,
|
|
|
+};
|
|
|
+
|
|
|
export enum TrainingTypeOrderByInput {
|
|
|
IdAsc = 'id_ASC',
|
|
|
IdDesc = 'id_DESC',
|
|
@@ -1478,6 +1635,11 @@ export type TrainingTypeWhereInput = {
|
|
|
description_not_ends_with?: Maybe<Scalars['String']>,
|
|
|
};
|
|
|
|
|
|
+export type TrainingTypeWhereUniqueInput = {
|
|
|
+ id?: Maybe<Scalars['ID']>,
|
|
|
+ name?: Maybe<Scalars['String']>,
|
|
|
+};
|
|
|
+
|
|
|
export type TrainingWhereInput = {
|
|
|
/** Logical AND on all given filters. */
|
|
|
AND?: Maybe<Array<TrainingWhereInput>>,
|
|
@@ -1907,19 +2069,61 @@ export type UserWhereInput = {
|
|
|
export type TrainingsQueryVariables = {};
|
|
|
|
|
|
|
|
|
-export type TrainingsQuery = { trainings: Array<Maybe<Pick<Training, 'id' | 'published'>>> };
|
|
|
+export type TrainingsQuery = { trainings: Array<(
|
|
|
+ Pick<Training, 'id' | 'title' | 'location' | 'trainingDate' | 'attendance' | 'published'>
|
|
|
+ & { type: Pick<TrainingType, 'id' | 'name' | 'description'> }
|
|
|
+ )> };
|
|
|
+
|
|
|
+export type TrainingTypesQueryVariables = {};
|
|
|
+
|
|
|
+
|
|
|
+export type TrainingTypesQuery = { trainingTypes: Array<Pick<TrainingType, 'id' | 'name' | 'description'>> };
|
|
|
+
|
|
|
+export type TrainingTypeQueryVariables = {
|
|
|
+ where: TrainingTypeWhereUniqueInput
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type TrainingTypeQuery = { trainingType: Maybe<Pick<TrainingType, 'id' | 'name' | 'description'>> };
|
|
|
+
|
|
|
+export type FormatsQueryVariables = {};
|
|
|
+
|
|
|
+
|
|
|
+export type FormatsQuery = { formats: Array<Pick<Format, 'id' | 'name' | 'description'>> };
|
|
|
|
|
|
export type CreateTrainingMutationVariables = {
|
|
|
- title: Scalars['String']
|
|
|
+ title: Scalars['String'],
|
|
|
+ type: TrainingTypeCreateOneInput,
|
|
|
+ trainingDate: Scalars['DateTime'],
|
|
|
+ location: Scalars['String'],
|
|
|
+ attendance: Scalars['Int'],
|
|
|
+ published: Scalars['Boolean'],
|
|
|
+ blocks: Array<BlockCreateInput>
|
|
|
};
|
|
|
|
|
|
|
|
|
export type CreateTrainingMutation = { createTraining: Pick<Training, 'id'> };
|
|
|
|
|
|
+export type CreateTrainingTypeMutationVariables = {
|
|
|
+ name: Scalars['String'],
|
|
|
+ description: Scalars['String']
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type CreateTrainingTypeMutation = { createTrainingType: Pick<TrainingType, 'id'> };
|
|
|
+
|
|
|
+export type CreateFormatMutationVariables = {
|
|
|
+ name: Scalars['String'],
|
|
|
+ description: Scalars['String']
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type CreateFormatMutation = { createFormat: Pick<Format, 'id'> };
|
|
|
+
|
|
|
export type UsersQueryVariables = {};
|
|
|
|
|
|
|
|
|
-export type UsersQuery = { users: Array<Maybe<Pick<User, 'id' | 'email' | 'name' | 'permissions' | 'interests'>>> };
|
|
|
+export type UsersQuery = { users: Array<Pick<User, 'id' | 'email' | 'name' | 'permissions' | 'interests'>> };
|
|
|
|
|
|
export type UserSignupMutationVariables = {
|
|
|
email: Scalars['String'],
|
|
@@ -1983,6 +2187,15 @@ export const TrainingsDocument = gql`
|
|
|
query trainings {
|
|
|
trainings {
|
|
|
id
|
|
|
+ title
|
|
|
+ type {
|
|
|
+ id
|
|
|
+ name
|
|
|
+ description
|
|
|
+ }
|
|
|
+ location
|
|
|
+ trainingDate
|
|
|
+ attendance
|
|
|
published
|
|
|
}
|
|
|
}
|
|
@@ -2012,9 +2225,112 @@ export function useTrainingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHo
|
|
|
export type TrainingsQueryHookResult = ReturnType<typeof useTrainingsQuery>;
|
|
|
export type TrainingsLazyQueryHookResult = ReturnType<typeof useTrainingsLazyQuery>;
|
|
|
export type TrainingsQueryResult = ApolloReactCommon.QueryResult<TrainingsQuery, TrainingsQueryVariables>;
|
|
|
+export const TrainingTypesDocument = gql`
|
|
|
+ query trainingTypes {
|
|
|
+ trainingTypes {
|
|
|
+ id
|
|
|
+ name
|
|
|
+ description
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useTrainingTypesQuery__
|
|
|
+ *
|
|
|
+ * To run a query within a React component, call `useTrainingTypesQuery` and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useTrainingTypesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
|
+ * you can use to render your UI.
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const { data, loading, error } = useTrainingTypesQuery({
|
|
|
+ * variables: {
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useTrainingTypesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<TrainingTypesQuery, TrainingTypesQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useQuery<TrainingTypesQuery, TrainingTypesQueryVariables>(TrainingTypesDocument, baseOptions);
|
|
|
+ }
|
|
|
+export function useTrainingTypesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<TrainingTypesQuery, TrainingTypesQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useLazyQuery<TrainingTypesQuery, TrainingTypesQueryVariables>(TrainingTypesDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type TrainingTypesQueryHookResult = ReturnType<typeof useTrainingTypesQuery>;
|
|
|
+export type TrainingTypesLazyQueryHookResult = ReturnType<typeof useTrainingTypesLazyQuery>;
|
|
|
+export type TrainingTypesQueryResult = ApolloReactCommon.QueryResult<TrainingTypesQuery, TrainingTypesQueryVariables>;
|
|
|
+export const TrainingTypeDocument = gql`
|
|
|
+ query trainingType($where: TrainingTypeWhereUniqueInput!) {
|
|
|
+ trainingType(where: $where) {
|
|
|
+ id
|
|
|
+ name
|
|
|
+ description
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useTrainingTypeQuery__
|
|
|
+ *
|
|
|
+ * To run a query within a React component, call `useTrainingTypeQuery` and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useTrainingTypeQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
|
+ * you can use to render your UI.
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const { data, loading, error } = useTrainingTypeQuery({
|
|
|
+ * variables: {
|
|
|
+ * where: // value for 'where'
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useTrainingTypeQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<TrainingTypeQuery, TrainingTypeQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useQuery<TrainingTypeQuery, TrainingTypeQueryVariables>(TrainingTypeDocument, baseOptions);
|
|
|
+ }
|
|
|
+export function useTrainingTypeLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<TrainingTypeQuery, TrainingTypeQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useLazyQuery<TrainingTypeQuery, TrainingTypeQueryVariables>(TrainingTypeDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type TrainingTypeQueryHookResult = ReturnType<typeof useTrainingTypeQuery>;
|
|
|
+export type TrainingTypeLazyQueryHookResult = ReturnType<typeof useTrainingTypeLazyQuery>;
|
|
|
+export type TrainingTypeQueryResult = ApolloReactCommon.QueryResult<TrainingTypeQuery, TrainingTypeQueryVariables>;
|
|
|
+export const FormatsDocument = gql`
|
|
|
+ query formats {
|
|
|
+ formats {
|
|
|
+ id
|
|
|
+ name
|
|
|
+ description
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useFormatsQuery__
|
|
|
+ *
|
|
|
+ * To run a query within a React component, call `useFormatsQuery` and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useFormatsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
|
+ * you can use to render your UI.
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const { data, loading, error } = useFormatsQuery({
|
|
|
+ * variables: {
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useFormatsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<FormatsQuery, FormatsQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useQuery<FormatsQuery, FormatsQueryVariables>(FormatsDocument, baseOptions);
|
|
|
+ }
|
|
|
+export function useFormatsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<FormatsQuery, FormatsQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useLazyQuery<FormatsQuery, FormatsQueryVariables>(FormatsDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type FormatsQueryHookResult = ReturnType<typeof useFormatsQuery>;
|
|
|
+export type FormatsLazyQueryHookResult = ReturnType<typeof useFormatsLazyQuery>;
|
|
|
+export type FormatsQueryResult = ApolloReactCommon.QueryResult<FormatsQuery, FormatsQueryVariables>;
|
|
|
export const CreateTrainingDocument = gql`
|
|
|
- mutation createTraining($title: String!) {
|
|
|
- createTraining(title: $title) {
|
|
|
+ mutation createTraining($title: String!, $type: TrainingTypeCreateOneInput!, $trainingDate: DateTime!, $location: String!, $attendance: Int!, $published: Boolean!, $blocks: [BlockCreateInput!]!) {
|
|
|
+ createTraining(title: $title, type: $type, trainingDate: $trainingDate, location: $location, attendance: $attendance, published: $published, blocks: $blocks) {
|
|
|
id
|
|
|
}
|
|
|
}
|
|
@@ -2035,6 +2351,12 @@ export type CreateTrainingMutationFn = ApolloReactCommon.MutationFunction<Create
|
|
|
* const [createTrainingMutation, { data, loading, error }] = useCreateTrainingMutation({
|
|
|
* variables: {
|
|
|
* title: // value for 'title'
|
|
|
+ * type: // value for 'type'
|
|
|
+ * trainingDate: // value for 'trainingDate'
|
|
|
+ * location: // value for 'location'
|
|
|
+ * attendance: // value for 'attendance'
|
|
|
+ * published: // value for 'published'
|
|
|
+ * blocks: // value for 'blocks'
|
|
|
* },
|
|
|
* });
|
|
|
*/
|
|
@@ -2044,6 +2366,72 @@ export function useCreateTrainingMutation(baseOptions?: ApolloReactHooks.Mutatio
|
|
|
export type CreateTrainingMutationHookResult = ReturnType<typeof useCreateTrainingMutation>;
|
|
|
export type CreateTrainingMutationResult = ApolloReactCommon.MutationResult<CreateTrainingMutation>;
|
|
|
export type CreateTrainingMutationOptions = ApolloReactCommon.BaseMutationOptions<CreateTrainingMutation, CreateTrainingMutationVariables>;
|
|
|
+export const CreateTrainingTypeDocument = gql`
|
|
|
+ mutation createTrainingType($name: String!, $description: String!) {
|
|
|
+ createTrainingType(name: $name, description: $description) {
|
|
|
+ id
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+export type CreateTrainingTypeMutationFn = ApolloReactCommon.MutationFunction<CreateTrainingTypeMutation, CreateTrainingTypeMutationVariables>;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useCreateTrainingTypeMutation__
|
|
|
+ *
|
|
|
+ * To run a mutation, you first call `useCreateTrainingTypeMutation` within a React component and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useCreateTrainingTypeMutation` returns a tuple that includes:
|
|
|
+ * - A mutate function that you can call at any time to execute the mutation
|
|
|
+ * - An object with fields that represent the current status of the mutation's execution
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const [createTrainingTypeMutation, { data, loading, error }] = useCreateTrainingTypeMutation({
|
|
|
+ * variables: {
|
|
|
+ * name: // value for 'name'
|
|
|
+ * description: // value for 'description'
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useCreateTrainingTypeMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<CreateTrainingTypeMutation, CreateTrainingTypeMutationVariables>) {
|
|
|
+ return ApolloReactHooks.useMutation<CreateTrainingTypeMutation, CreateTrainingTypeMutationVariables>(CreateTrainingTypeDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type CreateTrainingTypeMutationHookResult = ReturnType<typeof useCreateTrainingTypeMutation>;
|
|
|
+export type CreateTrainingTypeMutationResult = ApolloReactCommon.MutationResult<CreateTrainingTypeMutation>;
|
|
|
+export type CreateTrainingTypeMutationOptions = ApolloReactCommon.BaseMutationOptions<CreateTrainingTypeMutation, CreateTrainingTypeMutationVariables>;
|
|
|
+export const CreateFormatDocument = gql`
|
|
|
+ mutation createFormat($name: String!, $description: String!) {
|
|
|
+ createFormat(name: $name, description: $description) {
|
|
|
+ id
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+export type CreateFormatMutationFn = ApolloReactCommon.MutationFunction<CreateFormatMutation, CreateFormatMutationVariables>;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useCreateFormatMutation__
|
|
|
+ *
|
|
|
+ * To run a mutation, you first call `useCreateFormatMutation` within a React component and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useCreateFormatMutation` returns a tuple that includes:
|
|
|
+ * - A mutate function that you can call at any time to execute the mutation
|
|
|
+ * - An object with fields that represent the current status of the mutation's execution
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const [createFormatMutation, { data, loading, error }] = useCreateFormatMutation({
|
|
|
+ * variables: {
|
|
|
+ * name: // value for 'name'
|
|
|
+ * description: // value for 'description'
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useCreateFormatMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<CreateFormatMutation, CreateFormatMutationVariables>) {
|
|
|
+ return ApolloReactHooks.useMutation<CreateFormatMutation, CreateFormatMutationVariables>(CreateFormatDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type CreateFormatMutationHookResult = ReturnType<typeof useCreateFormatMutation>;
|
|
|
+export type CreateFormatMutationResult = ApolloReactCommon.MutationResult<CreateFormatMutation>;
|
|
|
+export type CreateFormatMutationOptions = ApolloReactCommon.BaseMutationOptions<CreateFormatMutation, CreateFormatMutationVariables>;
|
|
|
export const UsersDocument = gql`
|
|
|
query Users {
|
|
|
users {
|