mirror of
https://github.com/yldio/copilot.git
synced 2025-01-09 18:40:12 +02:00
27 lines
427 B
JavaScript
27 lines
427 B
JavaScript
|
var fetch = require('graphql-fetch')(`${document.location.origin}/graphql`);
|
||
|
|
||
|
exports.fetchChanges = () => {
|
||
|
return fetch(`
|
||
|
query {
|
||
|
changes {
|
||
|
id,
|
||
|
product {
|
||
|
id,
|
||
|
artist,
|
||
|
title,
|
||
|
label,
|
||
|
format,
|
||
|
price,
|
||
|
currency
|
||
|
},
|
||
|
price,
|
||
|
currency
|
||
|
}
|
||
|
}
|
||
|
`).then(({
|
||
|
data
|
||
|
}) => {
|
||
|
return data.changes;
|
||
|
});
|
||
|
};
|