mirror of
https://github.com/wassname/talk.git
synced 2026-07-06 05:17:19 +08:00
31 lines
690 B
JavaScript
31 lines
690 B
JavaScript
import {graphql} from 'react-apollo';
|
|
|
|
import MOST_FLAGS from './mostFlags.graphql';
|
|
import MOD_QUEUE_QUERY from './modQueueQuery.graphql';
|
|
|
|
export const mostFlags = graphql(MOST_FLAGS, {
|
|
options: () => {
|
|
|
|
// currently hard-coded per Greg's advice
|
|
const fiveMinutesAgo = new Date();
|
|
fiveMinutesAgo.setMinutes(fiveMinutesAgo.getMinutes() - 305);
|
|
return {
|
|
variables: {
|
|
sort: 'FLAG',
|
|
from: fiveMinutesAgo.toISOString(),
|
|
to: new Date().toISOString()
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
export const modQueueQuery = graphql(MOD_QUEUE_QUERY, {
|
|
options: ({params: {id = null}}) => {
|
|
return {
|
|
variables: {
|
|
asset_id: id
|
|
}
|
|
};
|
|
}
|
|
});
|