|
@@ -1656,15 +1656,15 @@ export enum Permission {
|
|
|
}
|
|
|
|
|
|
export type Query = {
|
|
|
+ publishedTrainings: Array<Training>,
|
|
|
+ training: Training,
|
|
|
+ trainings: Array<Training>,
|
|
|
+ trainingsCount: TrainingConnection,
|
|
|
fsFiles: Array<FsFile>,
|
|
|
files: Array<File>,
|
|
|
currentUser: User,
|
|
|
user?: Maybe<User>,
|
|
|
users: Array<User>,
|
|
|
- training?: Maybe<Training>,
|
|
|
- trainings: Array<Training>,
|
|
|
- publishedTrainings: Array<Training>,
|
|
|
- trainingsCount: TrainingConnection,
|
|
|
trainingType?: Maybe<TrainingType>,
|
|
|
trainingTypes: Array<TrainingType>,
|
|
|
block?: Maybe<Block>,
|
|
@@ -1676,19 +1676,22 @@ export type Query = {
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type QueryFsFilesArgs = {
|
|
|
- directory: Scalars['String']
|
|
|
+export type QueryPublishedTrainingsArgs = {
|
|
|
+ where?: Maybe<TrainingWhereInput>,
|
|
|
+ orderBy?: Maybe<TrainingOrderByInput>,
|
|
|
+ skip?: Maybe<Scalars['Int']>,
|
|
|
+ first?: Maybe<Scalars['Int']>
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type QueryUserArgs = {
|
|
|
- where: UserWhereUniqueInput
|
|
|
+export type QueryTrainingArgs = {
|
|
|
+ id?: Maybe<Scalars['ID']>
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type QueryUsersArgs = {
|
|
|
- where?: Maybe<UserWhereInput>,
|
|
|
- orderBy?: Maybe<UserOrderByInput>,
|
|
|
+export type QueryTrainingsArgs = {
|
|
|
+ where?: Maybe<TrainingWhereInput>,
|
|
|
+ orderBy?: Maybe<TrainingOrderByInput>,
|
|
|
skip?: Maybe<Scalars['Int']>,
|
|
|
after?: Maybe<Scalars['String']>,
|
|
|
before?: Maybe<Scalars['String']>,
|
|
@@ -1697,14 +1700,24 @@ export type QueryUsersArgs = {
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type QueryTrainingArgs = {
|
|
|
- id: Scalars['ID']
|
|
|
+export type QueryTrainingsCountArgs = {
|
|
|
+ where?: Maybe<TrainingWhereInput>
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type QueryTrainingsArgs = {
|
|
|
- where?: Maybe<TrainingWhereInput>,
|
|
|
- orderBy?: Maybe<TrainingOrderByInput>,
|
|
|
+export type QueryFsFilesArgs = {
|
|
|
+ directory: Scalars['String']
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type QueryUserArgs = {
|
|
|
+ where: UserWhereUniqueInput
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type QueryUsersArgs = {
|
|
|
+ where?: Maybe<UserWhereInput>,
|
|
|
+ orderBy?: Maybe<UserOrderByInput>,
|
|
|
skip?: Maybe<Scalars['Int']>,
|
|
|
after?: Maybe<Scalars['String']>,
|
|
|
before?: Maybe<Scalars['String']>,
|
|
@@ -1713,11 +1726,6 @@ export type QueryTrainingsArgs = {
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type QueryTrainingsCountArgs = {
|
|
|
- where?: Maybe<TrainingWhereInput>
|
|
|
-};
|
|
|
-
|
|
|
-
|
|
|
export type QueryTrainingTypeArgs = {
|
|
|
where: TrainingTypeWhereUniqueInput
|
|
|
};
|
|
@@ -3399,87 +3407,25 @@ export type UserWhereUniqueInput = {
|
|
|
email?: Maybe<Scalars['String']>,
|
|
|
};
|
|
|
|
|
|
-export type ExerciseContentFragment = Pick<Exercise, 'id' | 'name' | 'description' | 'videos' | 'pictures' | 'targets' | 'baseExercise'>;
|
|
|
+export type PublishedTrainingsQueryVariables = {
|
|
|
+ where?: Maybe<TrainingWhereInput>,
|
|
|
+ orderBy?: Maybe<TrainingOrderByInput>,
|
|
|
+ skip?: Maybe<Scalars['Int']>,
|
|
|
+ first?: Maybe<Scalars['Int']>
|
|
|
+};
|
|
|
|
|
|
-export type BlockWithoutBlocksFragment = (
|
|
|
- Pick<Block, 'id' | 'title' | 'description' | 'videos' | 'pictures' | 'duration' | 'rest'>
|
|
|
- & { format: Pick<Format, 'id' | 'name' | 'description'>, exercises: Maybe<Array<(
|
|
|
- Pick<ExerciseInstance, 'id' | 'order' | 'repetitions' | 'variation'>
|
|
|
- & { exercise: ExerciseContentFragment }
|
|
|
- )>> }
|
|
|
-);
|
|
|
|
|
|
-export type BlockInstanceWithoutBlockFragment = Pick<BlockInstance, 'id' | 'order' | 'rounds' | 'variation'>;
|
|
|
+export type PublishedTrainingsQuery = { publishedTrainings: Array<(
|
|
|
+ Pick<Training, 'id' | 'title' | 'trainingDate' | 'attendance'>
|
|
|
+ & { type: Pick<TrainingType, 'id' | 'name' | 'description'>, registrations: Maybe<Array<Pick<User, 'id'>>> }
|
|
|
+ )>, count: { aggregate: Pick<AggregateTraining, 'count'> } };
|
|
|
|
|
|
export type TrainingQueryVariables = {
|
|
|
- id: Scalars['ID']
|
|
|
+ id?: Maybe<Scalars['ID']>
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type TrainingQuery = { training: Maybe<(
|
|
|
- Pick<Training, 'id' | 'title' | 'createdAt' | 'trainingDate' | 'location' | 'attendance' | 'published'>
|
|
|
- & { type: Pick<TrainingType, 'id' | 'name' | 'description'>, blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<(
|
|
|
- { block: BlockWithoutBlocksFragment }
|
|
|
- & BlockInstanceWithoutBlockFragment
|
|
|
- )>> }
|
|
|
- & BlockWithoutBlocksFragment
|
|
|
- ) }
|
|
|
- & BlockInstanceWithoutBlockFragment
|
|
|
- )>> }
|
|
|
- & BlockWithoutBlocksFragment
|
|
|
- ) }
|
|
|
- & BlockInstanceWithoutBlockFragment
|
|
|
- )>>, registrations: Maybe<Array<Pick<User, 'id' | 'name'>>> }
|
|
|
- )> };
|
|
|
-
|
|
|
-export type DisplayTrainingFragment = (
|
|
|
- Pick<Training, 'id' | 'title' | 'trainingDate' | 'location' | 'attendance'>
|
|
|
- & { type: Pick<TrainingType, 'id' | 'name' | 'description'>, blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<Pick<BlockInstance, 'id'>>> }
|
|
|
- & DisplayBlockFragment
|
|
|
- ) }
|
|
|
- & DisplayBlockInstanceFragment
|
|
|
- )>> }
|
|
|
- & DisplayBlockFragment
|
|
|
- ) }
|
|
|
- & DisplayBlockInstanceFragment
|
|
|
- )>> }
|
|
|
- & DisplayBlockFragment
|
|
|
- ) }
|
|
|
- & DisplayBlockInstanceFragment
|
|
|
- )>>, registrations: Maybe<Array<Pick<User, 'id'>>> }
|
|
|
-);
|
|
|
-
|
|
|
-export type DisplayBlockInstanceFragment = Pick<BlockInstance, 'id' | 'order' | 'rounds' | 'variation'>;
|
|
|
-
|
|
|
-export type DisplayBlockFragment = (
|
|
|
- Pick<Block, 'id' | 'title' | 'description' | 'videos' | 'pictures' | 'duration' | 'rest'>
|
|
|
- & { format: Pick<Format, 'name' | 'description'>, exercises: Maybe<Array<(
|
|
|
- Pick<ExerciseInstance, 'order' | 'repetitions' | 'variation'>
|
|
|
- & { exercise: DisplayExerciseFragment }
|
|
|
- )>> }
|
|
|
-);
|
|
|
-
|
|
|
-export type DisplayExerciseInstanceFragment = (
|
|
|
- Pick<ExerciseInstance, 'id' | 'order' | 'repetitions' | 'variation'>
|
|
|
- & { exercise: DisplayExerciseFragment }
|
|
|
-);
|
|
|
-
|
|
|
-export type DisplayExerciseFragment = Pick<Exercise, 'id' | 'name' | 'description' | 'videos' | 'pictures' | 'targets' | 'baseExercise'>;
|
|
|
-
|
|
|
-export type PublishedTrainingsQueryVariables = {};
|
|
|
-
|
|
|
-
|
|
|
-export type PublishedTrainingsQuery = { publishedTrainings: Array<DisplayTrainingFragment> };
|
|
|
+export type TrainingQuery = { training: DisplayTrainingFragment };
|
|
|
|
|
|
export type TrainingsQueryVariables = {
|
|
|
where?: Maybe<TrainingWhereInput>,
|
|
@@ -3492,25 +3438,7 @@ export type TrainingsQueryVariables = {
|
|
|
};
|
|
|
|
|
|
|
|
|
-export type TrainingsQuery = { count: { aggregate: Pick<AggregateTraining, 'count'> }, trainings: Array<(
|
|
|
- Pick<Training, 'id' | 'title' | 'trainingDate' | 'location' | 'attendance' | 'published'>
|
|
|
- & { type: Pick<TrainingType, 'id' | 'name' | 'description'>, blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<(
|
|
|
- { block: (
|
|
|
- { blocks: Maybe<Array<(
|
|
|
- { block: BlockWithoutBlocksFragment }
|
|
|
- & BlockInstanceWithoutBlockFragment
|
|
|
- )>> }
|
|
|
- & BlockWithoutBlocksFragment
|
|
|
- ) }
|
|
|
- & BlockInstanceWithoutBlockFragment
|
|
|
- )>> }
|
|
|
- & BlockWithoutBlocksFragment
|
|
|
- ) }
|
|
|
- & BlockInstanceWithoutBlockFragment
|
|
|
- )>>, registrations: Maybe<Array<Pick<User, 'id' | 'name'>>> }
|
|
|
- )> };
|
|
|
+export type TrainingsQuery = { count: { aggregate: Pick<AggregateTraining, 'count'> }, trainings: Array<DisplayTrainingFragment> };
|
|
|
|
|
|
export type TrainingTypesQueryVariables = {};
|
|
|
|
|
@@ -3527,7 +3455,13 @@ export type BlocksQueryVariables = {};
|
|
|
|
|
|
export type BlocksQuery = { blocks: Array<(
|
|
|
{ blocks: Maybe<Array<(
|
|
|
- { block: BlockWithoutBlocksFragment }
|
|
|
+ { block: (
|
|
|
+ { blocks: Maybe<Array<(
|
|
|
+ { block: BlockWithoutBlocksFragment }
|
|
|
+ & BlockInstanceWithoutBlockFragment
|
|
|
+ )>> }
|
|
|
+ & BlockWithoutBlocksFragment
|
|
|
+ ) }
|
|
|
& BlockInstanceWithoutBlockFragment
|
|
|
)>> }
|
|
|
& BlockWithoutBlocksFragment
|
|
@@ -3597,6 +3531,47 @@ export type PublishMutationVariables = {
|
|
|
|
|
|
export type PublishMutation = Pick<Mutation, 'publish'>;
|
|
|
|
|
|
+export type ExerciseContentFragment = Pick<Exercise, 'id' | 'name' | 'description' | 'videos' | 'pictures' | 'targets' | 'baseExercise'>;
|
|
|
+
|
|
|
+export type BlockWithoutBlocksFragment = (
|
|
|
+ Pick<Block, 'id' | 'title' | 'description' | 'videos' | 'pictures' | 'duration' | 'rest'>
|
|
|
+ & { format: Pick<Format, 'id' | 'name' | 'description'>, exercises: Maybe<Array<(
|
|
|
+ Pick<ExerciseInstance, 'id' | 'order' | 'repetitions' | 'variation'>
|
|
|
+ & { exercise: ExerciseContentFragment }
|
|
|
+ )>> }
|
|
|
+);
|
|
|
+
|
|
|
+export type BlockInstanceWithoutBlockFragment = Pick<BlockInstance, 'id' | 'order' | 'rounds' | 'variation'>;
|
|
|
+
|
|
|
+export type DisplayTrainingFragment = (
|
|
|
+ Pick<Training, 'id' | 'title' | 'createdAt' | 'trainingDate' | 'location' | 'attendance' | 'published'>
|
|
|
+ & { type: Pick<TrainingType, 'id' | 'name' | 'description'>, blocks: Maybe<Array<(
|
|
|
+ { block: (
|
|
|
+ { blocks: Maybe<Array<(
|
|
|
+ { block: (
|
|
|
+ { blocks: Maybe<Array<(
|
|
|
+ { block: (
|
|
|
+ { blocks: Maybe<Array<(
|
|
|
+ { block: (
|
|
|
+ { blocks: Maybe<Array<Pick<BlockInstance, 'id'>>> }
|
|
|
+ & BlockWithoutBlocksFragment
|
|
|
+ ) }
|
|
|
+ & BlockInstanceWithoutBlockFragment
|
|
|
+ )>> }
|
|
|
+ & BlockWithoutBlocksFragment
|
|
|
+ ) }
|
|
|
+ & BlockInstanceWithoutBlockFragment
|
|
|
+ )>> }
|
|
|
+ & BlockWithoutBlocksFragment
|
|
|
+ ) }
|
|
|
+ & BlockInstanceWithoutBlockFragment
|
|
|
+ )>> }
|
|
|
+ & BlockWithoutBlocksFragment
|
|
|
+ ) }
|
|
|
+ & BlockInstanceWithoutBlockFragment
|
|
|
+ )>>, registrations: Maybe<Array<Pick<User, 'id'>>> }
|
|
|
+);
|
|
|
+
|
|
|
export type UsersQueryVariables = {};
|
|
|
|
|
|
|
|
@@ -3659,6 +3634,14 @@ export type UserUpdateMutationVariables = {
|
|
|
|
|
|
export type UserUpdateMutation = { updateUser: Maybe<Pick<User, 'id' | 'name' | 'email' | 'permissions' | 'interests'>> };
|
|
|
|
|
|
+export const BlockInstanceWithoutBlockFragmentDoc = gql`
|
|
|
+ fragment blockInstanceWithoutBlock on BlockInstance {
|
|
|
+ id
|
|
|
+ order
|
|
|
+ rounds
|
|
|
+ variation
|
|
|
+}
|
|
|
+ `;
|
|
|
export const ExerciseContentFragmentDoc = gql`
|
|
|
fragment exerciseContent on Exercise {
|
|
|
id
|
|
@@ -3695,56 +3678,6 @@ export const BlockWithoutBlocksFragmentDoc = gql`
|
|
|
}
|
|
|
}
|
|
|
${ExerciseContentFragmentDoc}`;
|
|
|
-export const BlockInstanceWithoutBlockFragmentDoc = gql`
|
|
|
- fragment blockInstanceWithoutBlock on BlockInstance {
|
|
|
- id
|
|
|
- order
|
|
|
- rounds
|
|
|
- variation
|
|
|
-}
|
|
|
- `;
|
|
|
-export const DisplayBlockInstanceFragmentDoc = gql`
|
|
|
- fragment displayBlockInstance on BlockInstance {
|
|
|
- id
|
|
|
- order
|
|
|
- rounds
|
|
|
- variation
|
|
|
-}
|
|
|
- `;
|
|
|
-export const DisplayExerciseFragmentDoc = gql`
|
|
|
- fragment displayExercise on Exercise {
|
|
|
- id
|
|
|
- name
|
|
|
- description
|
|
|
- videos
|
|
|
- pictures
|
|
|
- targets
|
|
|
- baseExercise
|
|
|
-}
|
|
|
- `;
|
|
|
-export const DisplayBlockFragmentDoc = gql`
|
|
|
- fragment displayBlock on Block {
|
|
|
- id
|
|
|
- title
|
|
|
- description
|
|
|
- videos
|
|
|
- pictures
|
|
|
- duration
|
|
|
- format {
|
|
|
- name
|
|
|
- description
|
|
|
- }
|
|
|
- rest
|
|
|
- exercises {
|
|
|
- order
|
|
|
- repetitions
|
|
|
- variation
|
|
|
- exercise {
|
|
|
- ...displayExercise
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
- ${DisplayExerciseFragmentDoc}`;
|
|
|
export const DisplayTrainingFragmentDoc = gql`
|
|
|
fragment displayTraining on Training {
|
|
|
id
|
|
@@ -3754,23 +3687,31 @@ export const DisplayTrainingFragmentDoc = gql`
|
|
|
name
|
|
|
description
|
|
|
}
|
|
|
+ createdAt
|
|
|
trainingDate
|
|
|
location
|
|
|
attendance
|
|
|
+ published
|
|
|
blocks {
|
|
|
- ...displayBlockInstance
|
|
|
+ ...blockInstanceWithoutBlock
|
|
|
block {
|
|
|
- ...displayBlock
|
|
|
+ ...blockWithoutBlocks
|
|
|
blocks {
|
|
|
- ...displayBlockInstance
|
|
|
+ ...blockInstanceWithoutBlock
|
|
|
block {
|
|
|
- ...displayBlock
|
|
|
+ ...blockWithoutBlocks
|
|
|
blocks {
|
|
|
- ...displayBlockInstance
|
|
|
+ ...blockInstanceWithoutBlock
|
|
|
block {
|
|
|
- ...displayBlock
|
|
|
+ ...blockWithoutBlocks
|
|
|
blocks {
|
|
|
- id
|
|
|
+ ...blockInstanceWithoutBlock
|
|
|
+ block {
|
|
|
+ ...blockWithoutBlocks
|
|
|
+ blocks {
|
|
|
+ id
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3782,22 +3723,11 @@ export const DisplayTrainingFragmentDoc = gql`
|
|
|
id
|
|
|
}
|
|
|
}
|
|
|
- ${DisplayBlockInstanceFragmentDoc}
|
|
|
-${DisplayBlockFragmentDoc}`;
|
|
|
-export const DisplayExerciseInstanceFragmentDoc = gql`
|
|
|
- fragment displayExerciseInstance on ExerciseInstance {
|
|
|
- id
|
|
|
- order
|
|
|
- repetitions
|
|
|
- variation
|
|
|
- exercise {
|
|
|
- ...displayExercise
|
|
|
- }
|
|
|
-}
|
|
|
- ${DisplayExerciseFragmentDoc}`;
|
|
|
-export const TrainingDocument = gql`
|
|
|
- query training($id: ID!) {
|
|
|
- training(id: $id) {
|
|
|
+ ${BlockInstanceWithoutBlockFragmentDoc}
|
|
|
+${BlockWithoutBlocksFragmentDoc}`;
|
|
|
+export const PublishedTrainingsDocument = gql`
|
|
|
+ query publishedTrainings($where: TrainingWhereInput, $orderBy: TrainingOrderByInput, $skip: Int, $first: Int) {
|
|
|
+ publishedTrainings(where: $where, orderBy: $orderBy, skip: $skip, first: $first) {
|
|
|
id
|
|
|
title
|
|
|
type {
|
|
@@ -3805,95 +3735,81 @@ export const TrainingDocument = gql`
|
|
|
name
|
|
|
description
|
|
|
}
|
|
|
- createdAt
|
|
|
trainingDate
|
|
|
- location
|
|
|
attendance
|
|
|
- published
|
|
|
- blocks {
|
|
|
- ...blockInstanceWithoutBlock
|
|
|
- block {
|
|
|
- ...blockWithoutBlocks
|
|
|
- blocks {
|
|
|
- ...blockInstanceWithoutBlock
|
|
|
- block {
|
|
|
- ...blockWithoutBlocks
|
|
|
- blocks {
|
|
|
- ...blockInstanceWithoutBlock
|
|
|
- block {
|
|
|
- ...blockWithoutBlocks
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
registrations {
|
|
|
id
|
|
|
- name
|
|
|
+ }
|
|
|
+ }
|
|
|
+ count: trainingsCount(where: $where) {
|
|
|
+ aggregate {
|
|
|
+ count
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- ${BlockInstanceWithoutBlockFragmentDoc}
|
|
|
-${BlockWithoutBlocksFragmentDoc}`;
|
|
|
+ `;
|
|
|
|
|
|
/**
|
|
|
- * __useTrainingQuery__
|
|
|
+ * __usePublishedTrainingsQuery__
|
|
|
*
|
|
|
- * To run a query within a React component, call `useTrainingQuery` and pass it any options that fit your needs.
|
|
|
- * When your component renders, `useTrainingQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
|
+ * To run a query within a React component, call `usePublishedTrainingsQuery` and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `usePublishedTrainingsQuery` 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 } = useTrainingQuery({
|
|
|
+ * const { data, loading, error } = usePublishedTrainingsQuery({
|
|
|
* variables: {
|
|
|
- * id: // value for 'id'
|
|
|
+ * where: // value for 'where'
|
|
|
+ * orderBy: // value for 'orderBy'
|
|
|
+ * skip: // value for 'skip'
|
|
|
+ * first: // value for 'first'
|
|
|
* },
|
|
|
* });
|
|
|
*/
|
|
|
-export function useTrainingQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<TrainingQuery, TrainingQueryVariables>) {
|
|
|
- return ApolloReactHooks.useQuery<TrainingQuery, TrainingQueryVariables>(TrainingDocument, baseOptions);
|
|
|
+export function usePublishedTrainingsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useQuery<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>(PublishedTrainingsDocument, baseOptions);
|
|
|
}
|
|
|
-export function useTrainingLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<TrainingQuery, TrainingQueryVariables>) {
|
|
|
- return ApolloReactHooks.useLazyQuery<TrainingQuery, TrainingQueryVariables>(TrainingDocument, baseOptions);
|
|
|
+export function usePublishedTrainingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useLazyQuery<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>(PublishedTrainingsDocument, baseOptions);
|
|
|
}
|
|
|
-export type TrainingQueryHookResult = ReturnType<typeof useTrainingQuery>;
|
|
|
-export type TrainingLazyQueryHookResult = ReturnType<typeof useTrainingLazyQuery>;
|
|
|
-export type TrainingQueryResult = ApolloReactCommon.QueryResult<TrainingQuery, TrainingQueryVariables>;
|
|
|
-export const PublishedTrainingsDocument = gql`
|
|
|
- query publishedTrainings {
|
|
|
- publishedTrainings {
|
|
|
+export type PublishedTrainingsQueryHookResult = ReturnType<typeof usePublishedTrainingsQuery>;
|
|
|
+export type PublishedTrainingsLazyQueryHookResult = ReturnType<typeof usePublishedTrainingsLazyQuery>;
|
|
|
+export type PublishedTrainingsQueryResult = ApolloReactCommon.QueryResult<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>;
|
|
|
+export const TrainingDocument = gql`
|
|
|
+ query training($id: ID) {
|
|
|
+ training(id: $id) {
|
|
|
...displayTraining
|
|
|
}
|
|
|
}
|
|
|
${DisplayTrainingFragmentDoc}`;
|
|
|
|
|
|
/**
|
|
|
- * __usePublishedTrainingsQuery__
|
|
|
+ * __useTrainingQuery__
|
|
|
*
|
|
|
- * To run a query within a React component, call `usePublishedTrainingsQuery` and pass it any options that fit your needs.
|
|
|
- * When your component renders, `usePublishedTrainingsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
|
+ * To run a query within a React component, call `useTrainingQuery` and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useTrainingQuery` 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 } = usePublishedTrainingsQuery({
|
|
|
+ * const { data, loading, error } = useTrainingQuery({
|
|
|
* variables: {
|
|
|
+ * id: // value for 'id'
|
|
|
* },
|
|
|
* });
|
|
|
*/
|
|
|
-export function usePublishedTrainingsQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>) {
|
|
|
- return ApolloReactHooks.useQuery<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>(PublishedTrainingsDocument, baseOptions);
|
|
|
+export function useTrainingQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<TrainingQuery, TrainingQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useQuery<TrainingQuery, TrainingQueryVariables>(TrainingDocument, baseOptions);
|
|
|
}
|
|
|
-export function usePublishedTrainingsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>) {
|
|
|
- return ApolloReactHooks.useLazyQuery<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>(PublishedTrainingsDocument, baseOptions);
|
|
|
+export function useTrainingLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<TrainingQuery, TrainingQueryVariables>) {
|
|
|
+ return ApolloReactHooks.useLazyQuery<TrainingQuery, TrainingQueryVariables>(TrainingDocument, baseOptions);
|
|
|
}
|
|
|
-export type PublishedTrainingsQueryHookResult = ReturnType<typeof usePublishedTrainingsQuery>;
|
|
|
-export type PublishedTrainingsLazyQueryHookResult = ReturnType<typeof usePublishedTrainingsLazyQuery>;
|
|
|
-export type PublishedTrainingsQueryResult = ApolloReactCommon.QueryResult<PublishedTrainingsQuery, PublishedTrainingsQueryVariables>;
|
|
|
+export type TrainingQueryHookResult = ReturnType<typeof useTrainingQuery>;
|
|
|
+export type TrainingLazyQueryHookResult = ReturnType<typeof useTrainingLazyQuery>;
|
|
|
+export type TrainingQueryResult = ApolloReactCommon.QueryResult<TrainingQuery, TrainingQueryVariables>;
|
|
|
export const TrainingsDocument = gql`
|
|
|
query trainings($where: TrainingWhereInput, $orderBy: TrainingOrderByInput, $skip: Int, $after: String, $before: String, $first: Int, $last: Int) {
|
|
|
count: trainingsCount(where: $where) {
|
|
@@ -3902,43 +3818,10 @@ export const TrainingsDocument = gql`
|
|
|
}
|
|
|
}
|
|
|
trainings(where: $where, orderBy: $orderBy, skip: $skip, after: $after, before: $before, first: $first, last: $last) {
|
|
|
- id
|
|
|
- title
|
|
|
- type {
|
|
|
- id
|
|
|
- name
|
|
|
- description
|
|
|
- }
|
|
|
- trainingDate
|
|
|
- location
|
|
|
- attendance
|
|
|
- published
|
|
|
- blocks {
|
|
|
- ...blockInstanceWithoutBlock
|
|
|
- block {
|
|
|
- ...blockWithoutBlocks
|
|
|
- blocks {
|
|
|
- ...blockInstanceWithoutBlock
|
|
|
- block {
|
|
|
- ...blockWithoutBlocks
|
|
|
- blocks {
|
|
|
- ...blockInstanceWithoutBlock
|
|
|
- block {
|
|
|
- ...blockWithoutBlocks
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- registrations {
|
|
|
- id
|
|
|
- name
|
|
|
- }
|
|
|
+ ...displayTraining
|
|
|
}
|
|
|
}
|
|
|
- ${BlockInstanceWithoutBlockFragmentDoc}
|
|
|
-${BlockWithoutBlocksFragmentDoc}`;
|
|
|
+ ${DisplayTrainingFragmentDoc}`;
|
|
|
|
|
|
/**
|
|
|
* __useTrainingsQuery__
|
|
@@ -4047,6 +3930,12 @@ export const BlocksDocument = gql`
|
|
|
...blockInstanceWithoutBlock
|
|
|
block {
|
|
|
...blockWithoutBlocks
|
|
|
+ blocks {
|
|
|
+ ...blockInstanceWithoutBlock
|
|
|
+ block {
|
|
|
+ ...blockWithoutBlocks
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|