@@ -102,17 +102,6 @@ export function getOperations(
102102 } satisfies Operation ) ,
103103 parameters : field . args ,
104104 } ) ;
105-
106- if ( fieldName === "commentsByPost" ) {
107- console . error (
108- createOperationDescription ( schema , {
109- name : fieldName ,
110- type : "query" ,
111- parameters : field . args ,
112- description : field . description ,
113- } satisfies Operation )
114- ) ;
115- }
116105 }
117106 }
118107
@@ -190,7 +179,10 @@ function buildZodSchemaFromVariables(
190179 schemaObj [ definition . name ] = argumentToZodSchema ( definition ) ;
191180 }
192181
193- return z . object ( schemaObj ) ;
182+ return z . object ( {
183+ variables : z . object ( schemaObj ) ,
184+ query : z . string ( ) ,
185+ } ) ;
194186}
195187
196188function argumentToZodSchema ( argument : GraphQLArgument ) : z . ZodTypeAny {
@@ -292,11 +284,15 @@ export async function createGraphQLHandler(config: Config) {
292284 tools,
293285 loadTools,
294286 async execute ( query : string , variables : unknown ) {
287+ const body = JSON . stringify ( { query, variables } ) ;
288+ console . error ( "body" , body ) ;
295289 const result = await fetch ( config . endpoint , {
296290 method : "POST" ,
297- body : JSON . stringify ( { query , variables } ) ,
291+ body,
298292 } ) ;
299293
294+ console . error ( "result" , await result . json ( ) ) ;
295+
300296 return {
301297 status : "success" ,
302298 data : await result . json ( ) ,
0 commit comments