|
|
@@ -14,6 +14,8 @@ import {
|
|
|
Variables,
|
|
|
} from 'relay-runtime';
|
|
|
|
|
|
+import csrf from './lib/utils/csrf';
|
|
|
+
|
|
|
// 100 cache entries, 300 seconds until cache is invalid.
|
|
|
export const cache = new QueryResponseCache({size: 100, ttl: 300000});
|
|
|
|
|
|
@@ -35,6 +37,7 @@ export const fetchQuery: FetchFunction = (
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
+ ...csrf.headers,
|
|
|
},
|
|
|
body: JSON.stringify({
|
|
|
query: operation.text,
|