aboutsummaryrefslogtreecommitdiff
path: root/source/library/fetcher
diff options
context:
space:
mode:
authornetop://ウィビ <paul@webb.page>2026-04-26 20:18:30 -0700
committernetop://ウィビ <paul@webb.page>2026-04-26 20:18:30 -0700
commit3c06c95f396b6e911076bc3291d5855ed01b5caa (patch)
tree17cd218339c52fbeee93d931303b04a3ff294f8b /source/library/fetcher
parentf059d97ab7f6d74d61139ac698cb871be7cb632e (diff)
downloadgraphiql-3c06c95f396b6e911076bc3291d5855ed01b5caa.tar.gz
graphiql-3c06c95f396b6e911076bc3291d5855ed01b5caa.zip
cleanup and ready for launch
Diffstat (limited to 'source/library/fetcher')
-rw-r--r--source/library/fetcher/apq.ts3
-rw-r--r--source/library/fetcher/sse.ts12
2 files changed, 12 insertions, 3 deletions
diff --git a/source/library/fetcher/apq.ts b/source/library/fetcher/apq.ts
index 7f9f3c1..854017b 100644
--- a/source/library/fetcher/apq.ts
+++ b/source/library/fetcher/apq.ts
@@ -54,7 +54,7 @@ export function createApqFetcher(options: ApqOptions): Fetcher {
};
}
-/*** INTERNAL ----------------------------------------- ***/
+/*** HELPER ------------------------------------------- ***/
async function getHash(cache: Map<string, string>, query: string): Promise<string> {
const cached = cache.get(query);
@@ -64,6 +64,7 @@ async function getHash(cache: Map<string, string>, query: string): Promise<strin
const hash = await sha256Hex(query);
cache.set(query, hash);
+
return hash;
}
diff --git a/source/library/fetcher/sse.ts b/source/library/fetcher/sse.ts
index c28436b..73a2da6 100644
--- a/source/library/fetcher/sse.ts
+++ b/source/library/fetcher/sse.ts
@@ -3,11 +3,19 @@
/*** IMPORT ------------------------------------------- ***/
-import { createClient, type Client, type ClientOptions } from "graphql-sse";
+import {
+ createClient,
+ type Client,
+ type ClientOptions
+} from "graphql-sse";
/*** UTILITY ------------------------------------------ ***/
-import type { Fetcher, FetcherOptions, FetcherResult } from "./types.ts";
+import type {
+ Fetcher,
+ FetcherOptions,
+ FetcherResult
+} from "./types.ts";
/*** EXPORT ------------------------------------------- ***/