cibus-frontend/src/lib/graphql/generated.ts
kjuulh 5238404e28
All checks were successful
continuous-integration/drone/push Build is passing
generated graphql
2022-08-21 00:44:36 +02:00

123 lines
3.1 KiB
TypeScript

import { gql } from "@apollo/client";
import * as Apollo from "@apollo/client";
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = {
[K in keyof T]: T[K];
};
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]?: Maybe<T[SubKey]>;
};
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]: Maybe<T[SubKey]>;
};
const defaultOptions = {} as const;
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
String: string;
Boolean: boolean;
Int: number;
Float: number;
};
export type Event = {
__typename?: "Event";
date: EventDate;
description?: Maybe<Array<Scalars["String"]>>;
id: Scalars["String"];
location?: Maybe<Scalars["String"]>;
name: Scalars["String"];
};
export type EventDate = {
__typename?: "EventDate";
day: Scalars["Int"];
hour: Scalars["Int"];
minute: Scalars["Int"];
month: Scalars["Int"];
year: Scalars["Int"];
};
export type QueryRoot = {
__typename?: "QueryRoot";
getUpcoming: Array<Event>;
};
export type GetUpcomingQueryVariables = Exact<{ [key: string]: never }>;
export type GetUpcomingQuery = {
__typename?: "QueryRoot";
getUpcoming: Array<{
__typename?: "Event";
name: string;
date: {
__typename?: "EventDate";
day: number;
hour: number;
month: number;
};
}>;
};
export const GetUpcomingDocument = gql`
query GetUpcoming {
getUpcoming {
name
date {
day
hour
month
}
}
}
`;
/**
* __useGetUpcomingQuery__
*
* To run a query within a React component, call `useGetUpcomingQuery` and pass it any options that fit your needs.
* When your component renders, `useGetUpcomingQuery` 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 } = useGetUpcomingQuery({
* variables: {
* },
* });
*/
export function useGetUpcomingQuery(
baseOptions?: Apollo.QueryHookOptions<
GetUpcomingQuery,
GetUpcomingQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetUpcomingQuery, GetUpcomingQueryVariables>(
GetUpcomingDocument,
options
);
}
export function useGetUpcomingLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetUpcomingQuery,
GetUpcomingQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<GetUpcomingQuery, GetUpcomingQueryVariables>(
GetUpcomingDocument,
options
);
}
export type GetUpcomingQueryHookResult = ReturnType<typeof useGetUpcomingQuery>;
export type GetUpcomingLazyQueryHookResult = ReturnType<
typeof useGetUpcomingLazyQuery
>;
export type GetUpcomingQueryResult = Apollo.QueryResult<
GetUpcomingQuery,
GetUpcomingQueryVariables
>;