UNPKG

@grafana/alerting

Version:

Grafana Alerting Library – Build vertical integrations on top of the industry-leading alerting solution

19 lines (16 loc) 634 B
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import { getAPIBaseURL, getAPIReducerPath } from '../util.mjs'; import { VERSION, GROUP } from './const.mjs'; const baseUrl = getAPIBaseURL(GROUP, VERSION); const reducerPath = getAPIReducerPath(GROUP, VERSION); const api = createApi({ reducerPath, baseQuery: fetchBaseQuery({ // Set URL correctly so MSW can intercept requests // https://mswjs.io/docs/runbook#rtk-query-requests-are-not-intercepted baseUrl: new URL(baseUrl, globalThis.location.origin).href }), endpoints: () => ({}) }); export { api }; //# sourceMappingURL=api.mjs.map