import { gql } from "@apollo/client"; import * as Apollo from "@apollo/client"; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K]; }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe; }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe; }; 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>; id: Scalars["String"]; location?: Maybe; 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; }; 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( GetUpcomingDocument, options ); } export function useGetUpcomingLazyQuery( baseOptions?: Apollo.LazyQueryHookOptions< GetUpcomingQuery, GetUpcomingQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useLazyQuery( GetUpcomingDocument, options ); } export type GetUpcomingQueryHookResult = ReturnType; export type GetUpcomingLazyQueryHookResult = ReturnType< typeof useGetUpcomingLazyQuery >; export type GetUpcomingQueryResult = Apollo.QueryResult< GetUpcomingQuery, GetUpcomingQueryVariables >;