MCPcopy Create free account
hub / github.com/artsy/force / isRequestCacheable

Function isRequestCacheable

src/System/Relay/isRequestCacheable.ts:4–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3const CACHEABLE_DIRECTIVE_REGEX = /@\bcacheable\b/
4export const isRequestCacheable = req => {
5 const queryText = req.operation?.text
6
7 return queryText && CACHEABLE_DIRECTIVE_REGEX.test(queryText)
8}
9
10export const hasNoCacheParamPresent = url => {
11 const queryString = url?.split("?")[1]

Callers 3

shouldSkipCDNCacheFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected