1+ // THIS FILE IS GENERATED, DO NOT EDIT!
2+ /* eslint-disable eslint-comments/no-unlimited-disable */
3+ /* tslint:disable */
4+ /* eslint-disable */
5+ /* prettier-ignore */
6+ import * as Types from '#graphql-client' ;
7+
8+ export type GetUsersQueryVariables = Types . Exact < { [ key : string ] : never ; } > ;
9+
10+
11+ export type GetUsersQuery = { __typename ?: 'Query' , users : Array < { __typename ?: 'User' , id : string , name : string , email : string , createdAt : any } > } ;
12+
13+ export type GetUserQueryVariables = Types . Exact < {
14+ id : Types . Scalars [ 'ID' ] [ 'input' ] ;
15+ } > ;
16+
17+
18+ export type GetUserQuery = { __typename ?: 'Query' , user ?: { __typename ?: 'User' , id : string , name : string , email : string , createdAt : any } | null } ;
19+
20+ export type GetTodosQueryVariables = Types . Exact < { [ key : string ] : never ; } > ;
21+
22+
23+ export type GetTodosQuery = { __typename ?: 'Query' , todos : Array < { __typename ?: 'Todo' , id : string , title : string , completed : boolean , createdAt : any } > } ;
24+
25+ export type GetPostsQueryVariables = Types . Exact < { [ key : string ] : never ; } > ;
26+
27+
28+ export type GetPostsQuery = { __typename ?: 'Query' , posts : Array < { __typename ?: 'Post' , id : string , title : string , content : string , authorId : string } > } ;
29+
30+ export type GetPostWithCommentsQueryVariables = Types . Exact < {
31+ postId : Types . Scalars [ 'ID' ] [ 'input' ] ;
32+ } > ;
33+
34+
35+ export type GetPostWithCommentsQuery = { __typename ?: 'Query' , post ?: { __typename ?: 'Post' , id : string , title : string , content : string , authorId : string } | null , comments : Array < { __typename ?: 'Comment' , id : string , content : string , authorId : string } > } ;
36+
37+
38+ export const GetUsersDocument = /*#__PURE__*/ `
39+ query GetUsers {
40+ users {
41+ id
42+ name
43+ email
44+ createdAt
45+ }
46+ }
47+ ` ;
48+ export const GetUserDocument = /*#__PURE__*/ `
49+ query GetUser($id: ID!) {
50+ user(id: $id) {
51+ id
52+ name
53+ email
54+ createdAt
55+ }
56+ }
57+ ` ;
58+ export const GetTodosDocument = /*#__PURE__*/ `
59+ query GetTodos {
60+ todos {
61+ id
62+ title
63+ completed
64+ createdAt
65+ }
66+ }
67+ ` ;
68+ export const GetPostsDocument = /*#__PURE__*/ `
69+ query GetPosts {
70+ posts {
71+ id
72+ title
73+ content
74+ authorId
75+ }
76+ }
77+ ` ;
78+ export const GetPostWithCommentsDocument = /*#__PURE__*/ `
79+ query GetPostWithComments($postId: ID!) {
80+ post(id: $postId) {
81+ id
82+ title
83+ content
84+ authorId
85+ }
86+ comments(postId: $postId) {
87+ id
88+ content
89+ authorId
90+ }
91+ }
92+ ` ;
93+ export type Requester < C = { } > = < R , V > ( doc : string , vars ?: V , options ?: C ) => Promise < R > | AsyncIterable < R >
94+ export function getSdk < C > ( requester : Requester < C > ) {
95+ return {
96+ GetUsers ( variables ?: Types . GetUsersQueryVariables , options ?: C ) : Promise < Types . GetUsersQuery > {
97+ return requester < Types . GetUsersQuery , Types . GetUsersQueryVariables > ( GetUsersDocument , variables , options ) as Promise < Types . GetUsersQuery > ;
98+ } ,
99+ GetUser ( variables : Types . GetUserQueryVariables , options ?: C ) : Promise < Types . GetUserQuery > {
100+ return requester < Types . GetUserQuery , Types . GetUserQueryVariables > ( GetUserDocument , variables , options ) as Promise < Types . GetUserQuery > ;
101+ } ,
102+ GetTodos ( variables ?: Types . GetTodosQueryVariables , options ?: C ) : Promise < Types . GetTodosQuery > {
103+ return requester < Types . GetTodosQuery , Types . GetTodosQueryVariables > ( GetTodosDocument , variables , options ) as Promise < Types . GetTodosQuery > ;
104+ } ,
105+ GetPosts ( variables ?: Types . GetPostsQueryVariables , options ?: C ) : Promise < Types . GetPostsQuery > {
106+ return requester < Types . GetPostsQuery , Types . GetPostsQueryVariables > ( GetPostsDocument , variables , options ) as Promise < Types . GetPostsQuery > ;
107+ } ,
108+ GetPostWithComments ( variables : Types . GetPostWithCommentsQueryVariables , options ?: C ) : Promise < Types . GetPostWithCommentsQuery > {
109+ return requester < Types . GetPostWithCommentsQuery , Types . GetPostWithCommentsQueryVariables > ( GetPostWithCommentsDocument , variables , options ) as Promise < Types . GetPostWithCommentsQuery > ;
110+ }
111+ } ;
112+ }
113+ export type Sdk = ReturnType < typeof getSdk > ;
0 commit comments