/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' 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 } /** 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 2007-12-03T10:15:30Z, is compliant with the date-time format outlined in section 5.6 of the RFC 3339 * profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. * * This scalar is a description of an exact instant on the timeline such as the instant that a user account was created. * * # Input Coercion * * When expected as an input type, only RFC 3339 compliant date-time strings are accepted. All other input values raise a query error indicating an incorrect type. * * # Result Coercion * * Where an RFC 3339 compliant date-time string has a time-zone other than UTC, it is shifted to UTC. * For example, the date-time string 2016-01-01T14:10:20+01:00 is shifted to 2016-01-01T13:10:20Z. */ DateTime: any } export type Comment = { __typename?: 'Comment' /** when the model was created */ createdAt: Scalars['DateTime'] id: Scalars['ID'] message: Scalars['String'] post?: Maybe /** when the model was updated */ updatedAt: Scalars['DateTime'] } export type CommentByInput = { id?: InputMaybe } /** Input to create a new CommentCommentRelatePostPost */ export type CommentCommentRelatePostPostCreateInput = { slug: Scalars['String'] title: Scalars['String'] } /** Input to create a new CommentCommentRelatePostPost relation */ export type CommentCommentRelatePostPostCreateRelationInput = { create?: InputMaybe link?: InputMaybe } /** Input to update a CommentCommentRelatePostPost relation */ export type CommentCommentRelatePostPostUpdateRelationInput = { create?: InputMaybe link?: InputMaybe unlink?: InputMaybe } export type CommentConnection = { __typename?: 'CommentConnection' edges?: Maybe>> /** Information to aid in pagination */ pageInfo: PageInfo } /** Input to create a new Comment */ export type CommentCreateInput = { message: Scalars['String'] post?: InputMaybe } export type CommentCreatePayload = { __typename?: 'CommentCreatePayload' comment?: Maybe } export type CommentDeletePayload = { __typename?: 'CommentDeletePayload' deletedId: Scalars['ID'] } export type CommentEdge = { __typename?: 'CommentEdge' cursor: Scalars['String'] node: Comment } /** Input to create a new Comment */ export type CommentUpdateInput = { message?: InputMaybe post?: InputMaybe } export type CommentUpdatePayload = { __typename?: 'CommentUpdatePayload' comment?: Maybe } export type Mutation = { __typename?: 'Mutation' /** Create a Comment */ commentCreate?: Maybe /** Delete a Comment by ID or unique field */ commentDelete?: Maybe /** Update a Comment */ commentUpdate?: Maybe /** Create a Post */ postCreate?: Maybe /** Delete a Post by ID or unique field */ postDelete?: Maybe /** Update a Post */ postUpdate?: Maybe } export type MutationCommentCreateArgs = { input: CommentCreateInput } export type MutationCommentDeleteArgs = { by: CommentByInput } export type MutationCommentUpdateArgs = { by: CommentByInput input: CommentUpdateInput } export type MutationPostCreateArgs = { input: PostCreateInput } export type MutationPostDeleteArgs = { by: PostByInput } export type MutationPostUpdateArgs = { by: PostByInput input: PostUpdateInput } export type PageInfo = { __typename?: 'PageInfo' endCursor?: Maybe hasNextPage: Scalars['Boolean'] hasPreviousPage: Scalars['Boolean'] startCursor?: Maybe } export type Post = { __typename?: 'Post' comments?: Maybe /** when the model was created */ createdAt: Scalars['DateTime'] id: Scalars['ID'] slug: Scalars['String'] title: Scalars['String'] /** when the model was updated */ updatedAt: Scalars['DateTime'] } export type PostCommentsArgs = { after?: InputMaybe before?: InputMaybe first?: InputMaybe last?: InputMaybe } export type PostByInput = { id?: InputMaybe slug?: InputMaybe } /** Input to create a new PostCommentRelatePostComment */ export type PostCommentRelatePostCommentCreateInput = { message: Scalars['String'] } /** Input to create a new PostCommentRelatePostComment relation */ export type PostCommentRelatePostCommentCreateRelationInput = { create?: InputMaybe link?: InputMaybe } /** Input to update a PostCommentRelatePostComment relation */ export type PostCommentRelatePostCommentUpdateRelationInput = { create?: InputMaybe link?: InputMaybe unlink?: InputMaybe } export type PostConnection = { __typename?: 'PostConnection' edges?: Maybe>> /** Information to aid in pagination */ pageInfo: PageInfo } /** Input to create a new Post */ export type PostCreateInput = { comments?: InputMaybe< Array> > slug: Scalars['String'] title: Scalars['String'] } export type PostCreatePayload = { __typename?: 'PostCreatePayload' post?: Maybe } export type PostDeletePayload = { __typename?: 'PostDeletePayload' deletedId: Scalars['ID'] } export type PostEdge = { __typename?: 'PostEdge' cursor: Scalars['String'] node: Post } /** Input to create a new Post */ export type PostUpdateInput = { comments?: InputMaybe< Array> > slug?: InputMaybe title?: InputMaybe } export type PostUpdatePayload = { __typename?: 'PostUpdatePayload' post?: Maybe } export type Query = { __typename?: 'Query' /** Query a single Comment by an ID or a unique field */ comment?: Maybe /** Paginated query to fetch the whole list of `Comment`. */ commentCollection?: Maybe /** Query a single Post by an ID or a unique field */ post?: Maybe /** Paginated query to fetch the whole list of `Post`. */ postCollection?: Maybe } export type QueryCommentArgs = { by: CommentByInput } export type QueryCommentCollectionArgs = { after?: InputMaybe before?: InputMaybe first?: InputMaybe last?: InputMaybe } export type QueryPostArgs = { by: PostByInput } export type QueryPostCollectionArgs = { after?: InputMaybe before?: InputMaybe first?: InputMaybe last?: InputMaybe } export type GetAllPostsQueryVariables = Exact<{ first: Scalars['Int'] }> export type GetAllPostsQuery = { __typename?: 'Query' postCollection?: { __typename?: 'PostConnection' edges?: Array<{ __typename?: 'PostEdge' node: { __typename?: 'Post'; id: string; title: string; slug: string } } | null> | null } | null } export type GetPostBySlugQueryVariables = Exact<{ slug: Scalars['String'] }> export type GetPostBySlugQuery = { __typename?: 'Query' post?: { __typename?: 'Post'; id: string; title: string; slug: string } | null } export const GetAllPostsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', name: { kind: 'Name', value: 'GetAllPosts' }, variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', name: { kind: 'Name', value: 'first' }, }, type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, }, ], selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'postCollection' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'first' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'first' }, }, }, ], selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'edges' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'node' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' }, }, { kind: 'Field', name: { kind: 'Name', value: 'title' }, }, { kind: 'Field', name: { kind: 'Name', value: 'slug' }, }, ], }, }, ], }, }, ], }, }, ], }, }, ], } as unknown as DocumentNode export const GetPostBySlugDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', name: { kind: 'Name', value: 'GetPostBySlug' }, variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' }, }, }, }, ], selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'post' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'by' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', name: { kind: 'Name', value: 'slug' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'slug' }, }, }, ], }, }, ], selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'title' } }, { kind: 'Field', name: { kind: 'Name', value: 'slug' } }, ], }, }, ], }, }, ], } as unknown as DocumentNode