🔥
This commit is contained in:
17
src/core/fetchQL.js
Normal file
17
src/core/fetchQL.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import fetch from './fetch';
|
||||
|
||||
export default function (query, params) {
|
||||
return fetch('/graphql', {
|
||||
method: 'post',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
query,
|
||||
params,
|
||||
}),
|
||||
credentials: 'include',
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user