@@ -5,7 +5,7 @@ import * as Apollo from '@apollo/client';
5
5
const defaultOptions = { } as const ;
6
6
export type CommonErrorFragment = { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } ;
7
7
8
- export type CommonResponseFragment = { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , correction : string } > | null } ;
8
+ export type CommonResponseFragment = { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null , references ?: Array < { __typename ?: 'DetailReference' , referenceId ?: number | null , summary : string , type : Types . ReferenceType , sqlSnippet ?: string | null , sqlLocation ?: { __typename ?: 'ReferenceSQLLocation' , column : number , line : number } | null } | null > | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , explain ?: { __typename ?: 'ThreadResponseExplainInfo' , queryId ?: string | null , status ?: Types . ExplainTaskStatus | null , error ?: any | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , referenceNum : number , correction : string } > | null } ;
9
9
10
10
export type SuggestedQuestionsQueryVariables = Types . Exact < { [ key : string ] : never ; } > ;
11
11
@@ -29,14 +29,14 @@ export type ThreadQueryVariables = Types.Exact<{
29
29
} > ;
30
30
31
31
32
- export type ThreadQuery = { __typename ?: 'Query' , thread : { __typename ?: 'DetailedThread' , id : number , sql : string , summary : string , responses : Array < { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , correction : string } > | null } > } } ;
32
+ export type ThreadQuery = { __typename ?: 'Query' , thread : { __typename ?: 'DetailedThread' , id : number , sql : string , summary : string , responses : Array < { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null , references ?: Array < { __typename ?: 'DetailReference' , referenceId ?: number | null , summary : string , type : Types . ReferenceType , sqlSnippet ?: string | null , sqlLocation ?: { __typename ?: 'ReferenceSQLLocation' , column : number , line : number } | null } | null > | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , explain ?: { __typename ?: 'ThreadResponseExplainInfo' , queryId ?: string | null , status ?: Types . ExplainTaskStatus | null , error ?: any | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , referenceNum : number , correction : string } > | null } > } } ;
33
33
34
34
export type ThreadResponseQueryVariables = Types . Exact < {
35
35
responseId : Types . Scalars [ 'Int' ] ;
36
36
} > ;
37
37
38
38
39
- export type ThreadResponseQuery = { __typename ?: 'Query' , threadResponse : { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , correction : string } > | null } } ;
39
+ export type ThreadResponseQuery = { __typename ?: 'Query' , threadResponse : { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null , references ?: Array < { __typename ?: 'DetailReference' , referenceId ?: number | null , summary : string , type : Types . ReferenceType , sqlSnippet ?: string | null , sqlLocation ?: { __typename ?: 'ReferenceSQLLocation' , column : number , line : number } | null } | null > | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , explain ?: { __typename ?: 'ThreadResponseExplainInfo' , queryId ?: string | null , status ?: Types . ExplainTaskStatus | null , error ?: any | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , referenceNum : number , correction : string } > | null } } ;
40
40
41
41
export type CreateAskingTaskMutationVariables = Types . Exact < {
42
42
data : Types . AskingTaskInput ;
@@ -65,7 +65,14 @@ export type CreateThreadResponseMutationVariables = Types.Exact<{
65
65
} > ;
66
66
67
67
68
- export type CreateThreadResponseMutation = { __typename ?: 'Mutation' , createThreadResponse : { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , correction : string } > | null } } ;
68
+ export type CreateThreadResponseMutation = { __typename ?: 'Mutation' , createThreadResponse : { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null , references ?: Array < { __typename ?: 'DetailReference' , referenceId ?: number | null , summary : string , type : Types . ReferenceType , sqlSnippet ?: string | null , sqlLocation ?: { __typename ?: 'ReferenceSQLLocation' , column : number , line : number } | null } | null > | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , explain ?: { __typename ?: 'ThreadResponseExplainInfo' , queryId ?: string | null , status ?: Types . ExplainTaskStatus | null , error ?: any | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , referenceNum : number , correction : string } > | null } } ;
69
+
70
+ export type CreateThreadResponseExplainMutationVariables = Types . Exact < {
71
+ where : Types . CreateThreadResponseExplainWhereInput ;
72
+ } > ;
73
+
74
+
75
+ export type CreateThreadResponseExplainMutation = { __typename ?: 'Mutation' , createThreadResponseExplain : any } ;
69
76
70
77
export type UpdateThreadMutationVariables = Types . Exact < {
71
78
where : Types . ThreadUniqueWhereInput ;
@@ -102,7 +109,7 @@ export type CreateCorrectedThreadResponseMutationVariables = Types.Exact<{
102
109
} > ;
103
110
104
111
105
- export type CreateCorrectedThreadResponseMutation = { __typename ?: 'Mutation' , createCorrectedThreadResponse : { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , correction : string } > | null } } ;
112
+ export type CreateCorrectedThreadResponseMutation = { __typename ?: 'Mutation' , createCorrectedThreadResponse : { __typename ?: 'ThreadResponse' , id : number , question : string , summary : string , status : Types . AskingTaskStatus , error ?: { __typename ?: 'Error' , code ?: string | null , shortMessage ?: string | null , message ?: string | null , stacktrace ?: Array < string | null > | null } | null , detail ?: { __typename ?: 'ThreadResponseDetail' , sql ?: string | null , description ?: string | null , steps : Array < { __typename ?: 'DetailStep' , summary : string , sql : string , cteName ?: string | null , references ?: Array < { __typename ?: 'DetailReference' , referenceId ?: number | null , summary : string , type : Types . ReferenceType , sqlSnippet ?: string | null , sqlLocation ?: { __typename ?: 'ReferenceSQLLocation' , column : number , line : number } | null } | null > | null } > , view ?: { __typename ?: 'ViewInfo' , id : number , name : string , statement : string , displayName : string } | null } | null , explain ?: { __typename ?: 'ThreadResponseExplainInfo' , queryId ?: string | null , status ?: Types . ExplainTaskStatus | null , error ?: any | null } | null , corrections ?: Array < { __typename ?: 'CorrectionDetail' , id : number , type : Types . ReferenceType , referenceNum : number , correction : string } > | null } } ;
106
113
107
114
export const CommonErrorFragmentDoc = gql `
108
115
fragment CommonError on Error {
@@ -125,6 +132,16 @@ export const CommonResponseFragmentDoc = gql`
125
132
summary
126
133
sql
127
134
cteName
135
+ references {
136
+ referenceId
137
+ summary
138
+ type
139
+ sqlSnippet
140
+ sqlLocation {
141
+ column
142
+ line
143
+ }
144
+ }
128
145
}
129
146
view {
130
147
id
@@ -133,9 +150,15 @@ export const CommonResponseFragmentDoc = gql`
133
150
displayName
134
151
}
135
152
}
153
+ explain {
154
+ queryId
155
+ status
156
+ error
157
+ }
136
158
corrections {
137
159
id
138
160
type
161
+ referenceNum
139
162
correction
140
163
}
141
164
}
@@ -481,6 +504,37 @@ export function useCreateThreadResponseMutation(baseOptions?: Apollo.MutationHoo
481
504
export type CreateThreadResponseMutationHookResult = ReturnType < typeof useCreateThreadResponseMutation > ;
482
505
export type CreateThreadResponseMutationResult = Apollo . MutationResult < CreateThreadResponseMutation > ;
483
506
export type CreateThreadResponseMutationOptions = Apollo . BaseMutationOptions < CreateThreadResponseMutation , CreateThreadResponseMutationVariables > ;
507
+ export const CreateThreadResponseExplainDocument = gql `
508
+ mutation CreateThreadResponseExplain($where: CreateThreadResponseExplainWhereInput!) {
509
+ createThreadResponseExplain(where: $where)
510
+ }
511
+ ` ;
512
+ export type CreateThreadResponseExplainMutationFn = Apollo . MutationFunction < CreateThreadResponseExplainMutation , CreateThreadResponseExplainMutationVariables > ;
513
+
514
+ /**
515
+ * __useCreateThreadResponseExplainMutation__
516
+ *
517
+ * To run a mutation, you first call `useCreateThreadResponseExplainMutation` within a React component and pass it any options that fit your needs.
518
+ * When your component renders, `useCreateThreadResponseExplainMutation` returns a tuple that includes:
519
+ * - A mutate function that you can call at any time to execute the mutation
520
+ * - An object with fields that represent the current status of the mutation's execution
521
+ *
522
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
523
+ *
524
+ * @example
525
+ * const [createThreadResponseExplainMutation, { data, loading, error }] = useCreateThreadResponseExplainMutation({
526
+ * variables: {
527
+ * where: // value for 'where'
528
+ * },
529
+ * });
530
+ */
531
+ export function useCreateThreadResponseExplainMutation ( baseOptions ?: Apollo . MutationHookOptions < CreateThreadResponseExplainMutation , CreateThreadResponseExplainMutationVariables > ) {
532
+ const options = { ...defaultOptions , ...baseOptions }
533
+ return Apollo . useMutation < CreateThreadResponseExplainMutation , CreateThreadResponseExplainMutationVariables > ( CreateThreadResponseExplainDocument , options ) ;
534
+ }
535
+ export type CreateThreadResponseExplainMutationHookResult = ReturnType < typeof useCreateThreadResponseExplainMutation > ;
536
+ export type CreateThreadResponseExplainMutationResult = Apollo . MutationResult < CreateThreadResponseExplainMutation > ;
537
+ export type CreateThreadResponseExplainMutationOptions = Apollo . BaseMutationOptions < CreateThreadResponseExplainMutation , CreateThreadResponseExplainMutationVariables > ;
484
538
export const UpdateThreadDocument = gql `
485
539
mutation UpdateThread($where: ThreadUniqueWhereInput!, $data: UpdateThreadInput!) {
486
540
updateThread(where: $where, data: $data) {
0 commit comments