122 lines
2.5 KiB
TypeScript
122 lines
2.5 KiB
TypeScript
import { gql } from '@apollo/client';
|
|
export type Maybe<T> = T | null;
|
|
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]> };
|
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
export type Scalars = {
|
|
ID: string;
|
|
String: string;
|
|
Boolean: boolean;
|
|
Int: number;
|
|
Float: number;
|
|
/** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
|
|
DateTime: any;
|
|
};
|
|
|
|
export type Article = {
|
|
__typename?: 'Article';
|
|
id: Scalars['ID'];
|
|
title: Scalars['String'];
|
|
content: Scalars['String'];
|
|
publishedAt?: Maybe<Scalars['DateTime']>;
|
|
tags: Array<Scalars['String']>;
|
|
html: Scalars['String'];
|
|
description?: Maybe<Scalars['String']>;
|
|
};
|
|
|
|
export type CreateArticleInput = {
|
|
title: Scalars['String'];
|
|
content: Scalars['String'];
|
|
publishedAt?: Maybe<Scalars['DateTime']>;
|
|
tags: Array<Scalars['String']>;
|
|
};
|
|
|
|
export type CreateTagInput = {
|
|
name: Scalars['String'];
|
|
};
|
|
|
|
|
|
export type Hello = {
|
|
__typename?: 'Hello';
|
|
message: Scalars['String'];
|
|
};
|
|
|
|
export type Mutation = {
|
|
__typename?: 'Mutation';
|
|
createArticle: Article;
|
|
updateArticle: Article;
|
|
removeArticle: Scalars['Int'];
|
|
createTag: Tag;
|
|
updateTag: Tag;
|
|
removeTag: Tag;
|
|
};
|
|
|
|
|
|
export type MutationCreateArticleArgs = {
|
|
createArticleInput: CreateArticleInput;
|
|
};
|
|
|
|
|
|
export type MutationUpdateArticleArgs = {
|
|
updateArticleInput: UpdateArticleInput;
|
|
};
|
|
|
|
|
|
export type MutationRemoveArticleArgs = {
|
|
id: Scalars['String'];
|
|
};
|
|
|
|
|
|
export type MutationCreateTagArgs = {
|
|
createTagInput: CreateTagInput;
|
|
};
|
|
|
|
|
|
export type MutationUpdateTagArgs = {
|
|
updateTagInput: UpdateTagInput;
|
|
};
|
|
|
|
|
|
export type MutationRemoveTagArgs = {
|
|
id: Scalars['String'];
|
|
};
|
|
|
|
export type Query = {
|
|
__typename?: 'Query';
|
|
hello: Hello;
|
|
articles: Array<Article>;
|
|
article: Article;
|
|
tags: Array<Tag>;
|
|
tag: Tag;
|
|
};
|
|
|
|
|
|
export type QueryArticleArgs = {
|
|
id: Scalars['String'];
|
|
};
|
|
|
|
|
|
export type QueryTagArgs = {
|
|
id: Scalars['String'];
|
|
};
|
|
|
|
export type Tag = {
|
|
__typename?: 'Tag';
|
|
id: Scalars['ID'];
|
|
name: Scalars['String'];
|
|
};
|
|
|
|
export type UpdateArticleInput = {
|
|
title?: Maybe<Scalars['String']>;
|
|
content?: Maybe<Scalars['String']>;
|
|
publishedAt?: Maybe<Scalars['DateTime']>;
|
|
tags?: Maybe<Array<Scalars['String']>>;
|
|
id: Scalars['String'];
|
|
};
|
|
|
|
export type UpdateTagInput = {
|
|
name?: Maybe<Scalars['String']>;
|
|
id: Scalars['String'];
|
|
};
|