Skip to content

Commit

Permalink
fix: update clear-mocks cache-mod to use DELETE sentinel obj
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-anderson committed May 18, 2023
1 parent 40cf65f commit 9b5e046
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/DevModeTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export const DevModeTools = ({
broadcast: true,
fields:
target !== "ALL"
? { [MOCK_CACHE_CONFIGS[target].ROOT_QUERY_FIELD_NAME]: () => [] }
? { [MOCK_CACHE_CONFIGS[target].ROOT_QUERY_FIELD_NAME]: (_, { DELETE }) => DELETE }
: {
[MOCK_CACHE_CONFIGS.WorkOrders.ROOT_QUERY_FIELD_NAME]: () => [],
[MOCK_CACHE_CONFIGS.Invoices.ROOT_QUERY_FIELD_NAME]: () => [],
[MOCK_CACHE_CONFIGS.Contacts.ROOT_QUERY_FIELD_NAME]: () => [],
[MOCK_CACHE_CONFIGS.WorkOrders.ROOT_QUERY_FIELD_NAME]: (_, { DELETE }) => DELETE,
[MOCK_CACHE_CONFIGS.Invoices.ROOT_QUERY_FIELD_NAME]: (_, { DELETE }) => DELETE,
[MOCK_CACHE_CONFIGS.Contacts.ROOT_QUERY_FIELD_NAME]: (_, { DELETE }) => DELETE,
},
});
// Run garbage collection to remove the single-item cache refs
Expand Down

0 comments on commit 9b5e046

Please sign in to comment.