mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
Regenerate GraphQL Server
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
"Invalid list type provided!"
|
||||
);
|
||||
|
||||
let filters;
|
||||
let filter = []
|
||||
|
||||
$: stats = queryStore({
|
||||
client: getContextClient(),
|
||||
@@ -35,10 +35,11 @@
|
||||
totalCoreHours
|
||||
}
|
||||
}`,
|
||||
variables: { filters },
|
||||
variables: { filter },
|
||||
pause: true
|
||||
});
|
||||
|
||||
let filters;
|
||||
let nameFilter = "";
|
||||
let sorting = { field: "totalJobs", direction: "down" };
|
||||
|
||||
@@ -91,7 +92,7 @@
|
||||
startTimeQuickSelect={true}
|
||||
menuText="Only {type.toLowerCase()}s with jobs that match the filters will show up"
|
||||
on:update={({ detail }) => {
|
||||
filters = detail.filters;
|
||||
$stats.variables = { filter: detail.filters }
|
||||
stats.resume();
|
||||
}}
|
||||
/>
|
||||
|
@@ -29,7 +29,7 @@
|
||||
let paging = { itemsPerPage, page }
|
||||
let filter = []
|
||||
|
||||
const jobs = queryStore({
|
||||
$: jobs = queryStore({
|
||||
client: getContextClient(),
|
||||
query: gql`
|
||||
query($filter: [JobFilter!]!, $sorting: OrderByInput!, $paging: PageRequest! ){
|
||||
@@ -60,7 +60,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
$: $jobs.variables = { ...$jobs.variables, sorting, paging }
|
||||
// $: $jobs.variables = { ...$jobs.variables, sorting, paging }
|
||||
$: matchedJobs = $jobs.data != null ? $jobs.data.jobs.count : 0
|
||||
|
||||
// (Re-)query and optionally set new filters.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { expiringCacheExchange } from "./cache-exchange.js";
|
||||
import {
|
||||
Client,
|
||||
CreateClient,
|
||||
setContextClient,
|
||||
fetchExchange,
|
||||
} from "@urql/svelte";
|
||||
@@ -22,7 +22,7 @@ export function init(extraInitQuery = "") {
|
||||
? getContext("jwt")
|
||||
: getContext("cc-config")["jwt"];
|
||||
|
||||
const client = new Client({
|
||||
const client = CreateClient({
|
||||
url: `${window.location.origin}/query`,
|
||||
fetchOptions:
|
||||
jwt != null ? { headers: { Authorization: `Bearer ${jwt}` } } : {},
|
||||
|
Reference in New Issue
Block a user