with formatting
This commit is contained in:
parent
9814112b54
commit
83b62a4953
@ -4,7 +4,8 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"generate:graphql": "graphql-codegen"
|
||||
"generate:graphql": "graphql-codegen",
|
||||
"format:graphql": "prettier -w src/lib/graphql/generated.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.6.9",
|
||||
|
@ -5,5 +5,6 @@ set -e
|
||||
cuddle_cli x download
|
||||
|
||||
pnpm run generate:graphql
|
||||
pnpm run format:graphql
|
||||
|
||||
git diff src/lib/graphql/generated.ts
|
||||
|
@ -1,10 +1,16 @@
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
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]> };
|
||||
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 = {
|
||||
@ -16,45 +22,50 @@ export type Scalars = {
|
||||
};
|
||||
|
||||
export type Event = {
|
||||
__typename?: 'Event';
|
||||
__typename?: "Event";
|
||||
date: EventDate;
|
||||
description?: Maybe<Array<Scalars['String']>>;
|
||||
id: Scalars['String'];
|
||||
location?: Maybe<Scalars['String']>;
|
||||
name: Scalars['String'];
|
||||
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'];
|
||||
__typename?: "EventDate";
|
||||
day: Scalars["Int"];
|
||||
hour: Scalars["Int"];
|
||||
minute: Scalars["Int"];
|
||||
month: Scalars["Int"];
|
||||
year: Scalars["Int"];
|
||||
};
|
||||
|
||||
export type QueryRoot = {
|
||||
__typename?: '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 } }> };
|
||||
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 };
|
||||
}>;
|
||||
};
|
||||
|
||||
export const GetUpcomingDocument = gql`
|
||||
query GetUpcoming {
|
||||
getUpcoming {
|
||||
name
|
||||
date {
|
||||
day
|
||||
hour
|
||||
query GetUpcoming {
|
||||
getUpcoming {
|
||||
name
|
||||
date {
|
||||
day
|
||||
hour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetUpcomingQuery__
|
||||
@ -71,14 +82,35 @@ export const GetUpcomingDocument = gql`
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
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 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>;
|
||||
export type GetUpcomingLazyQueryHookResult = ReturnType<
|
||||
typeof useGetUpcomingLazyQuery
|
||||
>;
|
||||
export type GetUpcomingQueryResult = Apollo.QueryResult<
|
||||
GetUpcomingQuery,
|
||||
GetUpcomingQueryVariables
|
||||
>;
|
||||
|
Loading…
Reference in New Issue
Block a user