debian-mirror-gitlab/app/assets/javascripts/work_items/utils.js
2023-03-04 22:38:38 +05:30

12 lines
549 B
JavaScript

import workItemQuery from './graphql/work_item.query.graphql';
import workItemByIidQuery from './graphql/work_item_by_iid.query.graphql';
import workItemNotesIdQuery from './graphql/work_item_notes.query.graphql';
import workItemNotesByIidQuery from './graphql/work_item_notes_by_iid.query.graphql';
export function getWorkItemQuery(isFetchedByIid) {
return isFetchedByIid ? workItemByIidQuery : workItemQuery;
}
export function getWorkItemNotesQuery(isFetchedByIid) {
return isFetchedByIid ? workItemNotesByIidQuery : workItemNotesIdQuery;
}