/// import import type { GraphQLArgs, GraphQLSchema } from "npm:graphql@16.6.0"; /// util import type { RenderPageOptions } from "../graphiql/render.ts"; interface MutationParams { mutation: string; operationName?: string; query?: never; variables?: Record; } interface QueryParams { mutation?: never; operationName?: string; query: string; variables?: Record; } /// export export interface GQLOptions extends Omit { context?: (val: Req) => Context | Promise; /// GraphQL playground graphiql?: boolean; /// Custom headers for responses headers?: HeadersInit; /// Custom options for GraphQL Playground playgroundOptions?: Omit; schema: GraphQLSchema; } export type GraphQLParams = QueryParams | MutationParams; export type GQLRequest = { headers: Headers; json: () => Promise; method: string; url: string; };