Skip to content

Commit

Permalink
Keep ttlPerSchemaCoordinate object reference
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloSzx committed Jul 5, 2023
1 parent 4489cae commit 7f58640
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/unlucky-mice-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@soundxyz/response-cache": patch
---

Keep ttlPerSchemaCoordinate object reference
2 changes: 1 addition & 1 deletion src/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export function useResponseCache({
const schemaCache = new WeakMap<GraphQLSchema, GraphQLSchema>();

// never cache Introspections
ttlPerSchemaCoordinate = { "Query.__schema": 0, ...ttlPerSchemaCoordinate };
ttlPerSchemaCoordinate["Query._schema"] ??= 0;

const enabledCachingDocuments = new WeakMap<DocumentNode, boolean>();

Expand Down

0 comments on commit 7f58640

Please sign in to comment.