@empathyco/x-components
Version:
Empathy X Components
22 lines (19 loc) • 726 B
JavaScript
import { XPlugin } from '../../../../plugins/x-plugin.js';
/**
* Default implementation for the {@link NextQueriesActions.fetchNextQueries}.
*
* @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
* provided by Vuex.
* @param request - The next queries request to make.
* @returns A Promise of NextQuery[] that resolves when it fetches next queries or `null`
* if the request was not made.
*
* @public
*/
const fetchNextQueries = async (_context, request) => {
return request
? XPlugin.adapter.nextQueries(request).then(({ nextQueries }) => nextQueries)
: null;
};
export { fetchNextQueries };
//# sourceMappingURL=fetch-next-queries.action.js.map