with formatting
This commit is contained in:
parent
9814112b54
commit
83b62a4953
@ -4,7 +4,8 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"generate:graphql": "graphql-codegen"
|
"generate:graphql": "graphql-codegen",
|
||||||
|
"format:graphql": "prettier -w src/lib/graphql/generated.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.6.9",
|
"@apollo/client": "^3.6.9",
|
||||||
|
@ -5,5 +5,6 @@ set -e
|
|||||||
cuddle_cli x download
|
cuddle_cli x download
|
||||||
|
|
||||||
pnpm run generate:graphql
|
pnpm run generate:graphql
|
||||||
|
pnpm run format:graphql
|
||||||
|
|
||||||
git diff src/lib/graphql/generated.ts
|
git diff src/lib/graphql/generated.ts
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from "@apollo/client";
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from "@apollo/client";
|
||||||
export type Maybe<T> = T | null;
|
export type Maybe<T> = T | null;
|
||||||
export type InputMaybe<T> = Maybe<T>;
|
export type InputMaybe<T> = Maybe<T>;
|
||||||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
export type Exact<T extends { [key: string]: unknown }> = {
|
||||||
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
[K in keyof T]: T[K];
|
||||||
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
};
|
||||||
|
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;
|
const defaultOptions = {} as const;
|
||||||
/** All built-in and custom scalars, mapped to their actual values */
|
/** All built-in and custom scalars, mapped to their actual values */
|
||||||
export type Scalars = {
|
export type Scalars = {
|
||||||
@ -16,45 +22,50 @@ export type Scalars = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type Event = {
|
export type Event = {
|
||||||
__typename?: 'Event';
|
__typename?: "Event";
|
||||||
date: EventDate;
|
date: EventDate;
|
||||||
description?: Maybe<Array<Scalars['String']>>;
|
description?: Maybe<Array<Scalars["String"]>>;
|
||||||
id: Scalars['String'];
|
id: Scalars["String"];
|
||||||
location?: Maybe<Scalars['String']>;
|
location?: Maybe<Scalars["String"]>;
|
||||||
name: Scalars['String'];
|
name: Scalars["String"];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EventDate = {
|
export type EventDate = {
|
||||||
__typename?: 'EventDate';
|
__typename?: "EventDate";
|
||||||
day: Scalars['Int'];
|
day: Scalars["Int"];
|
||||||
hour: Scalars['Int'];
|
hour: Scalars["Int"];
|
||||||
minute: Scalars['Int'];
|
minute: Scalars["Int"];
|
||||||
month: Scalars['Int'];
|
month: Scalars["Int"];
|
||||||
year: Scalars['Int'];
|
year: Scalars["Int"];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type QueryRoot = {
|
export type QueryRoot = {
|
||||||
__typename?: 'QueryRoot';
|
__typename?: "QueryRoot";
|
||||||
getUpcoming: Array<Event>;
|
getUpcoming: Array<Event>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetUpcomingQueryVariables = Exact<{ [key: string]: never; }>;
|
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 GetUpcomingQuery = {
|
||||||
|
__typename?: "QueryRoot";
|
||||||
|
getUpcoming: Array<{
|
||||||
|
__typename?: "Event";
|
||||||
|
name: string;
|
||||||
|
date: { __typename?: "EventDate"; day: number; hour: number };
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
export const GetUpcomingDocument = gql`
|
export const GetUpcomingDocument = gql`
|
||||||
query GetUpcoming {
|
query GetUpcoming {
|
||||||
getUpcoming {
|
getUpcoming {
|
||||||
name
|
name
|
||||||
date {
|
date {
|
||||||
day
|
day
|
||||||
hour
|
hour
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __useGetUpcomingQuery__
|
* __useGetUpcomingQuery__
|
||||||
@ -71,14 +82,35 @@ export const GetUpcomingDocument = gql`
|
|||||||
* },
|
* },
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
export function useGetUpcomingQuery(baseOptions?: Apollo.QueryHookOptions<GetUpcomingQuery, GetUpcomingQueryVariables>) {
|
export function useGetUpcomingQuery(
|
||||||
const options = {...defaultOptions, ...baseOptions}
|
baseOptions?: Apollo.QueryHookOptions<
|
||||||
return Apollo.useQuery<GetUpcomingQuery, GetUpcomingQueryVariables>(GetUpcomingDocument, options);
|
GetUpcomingQuery,
|
||||||
}
|
GetUpcomingQueryVariables
|
||||||
export function useGetUpcomingLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetUpcomingQuery, GetUpcomingQueryVariables>) {
|
>
|
||||||
const options = {...defaultOptions, ...baseOptions}
|
) {
|
||||||
return Apollo.useLazyQuery<GetUpcomingQuery, GetUpcomingQueryVariables>(GetUpcomingDocument, options);
|
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 GetUpcomingQueryHookResult = ReturnType<typeof useGetUpcomingQuery>;
|
||||||
export type GetUpcomingLazyQueryHookResult = ReturnType<typeof useGetUpcomingLazyQuery>;
|
export type GetUpcomingLazyQueryHookResult = ReturnType<
|
||||||
export type GetUpcomingQueryResult = Apollo.QueryResult<GetUpcomingQuery, GetUpcomingQueryVariables>;
|
typeof useGetUpcomingLazyQuery
|
||||||
|
>;
|
||||||
|
export type GetUpcomingQueryResult = Apollo.QueryResult<
|
||||||
|
GetUpcomingQuery,
|
||||||
|
GetUpcomingQueryVariables
|
||||||
|
>;
|
||||||
|
Loading…
Reference in New Issue
Block a user