fix: revert back to using typed documents for GraphQL
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { TypedDocumentNode } from "@graphql-typed-document-node/core";
|
||||
import { DurableObject } from "cloudflare:workers";
|
||||
import { print } from "graphql";
|
||||
import { z } from "zod";
|
||||
@@ -271,7 +272,7 @@ export class AnilistDurableObject extends DurableObject {
|
||||
}
|
||||
|
||||
async fetchFromAnilist<Result = any, Variables = any>(
|
||||
queryString: string,
|
||||
query: TypedDocumentNode<Result, Variables>,
|
||||
variables: Variables,
|
||||
token?: string | undefined,
|
||||
): Promise<Result> {
|
||||
@@ -285,7 +286,7 @@ export class AnilistDurableObject extends DurableObject {
|
||||
|
||||
// Use the query passed in, or fallback if needed (though we expect it to be passed)
|
||||
// We print the query to string
|
||||
// const queryString = print(query);
|
||||
const queryString = print(query);
|
||||
|
||||
const response = await fetch(`${this.env.PROXY_URL}/proxy`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user