fix: significantly reduce unnecessary GraphQL HTTP calls for config information

Also stops calling the heavy ABOUT GraphQL query on HomeView, which does not require the longDescription field.

Fixes #1598
This commit is contained in:
Massedil
2025-06-20 23:58:41 +02:00
parent 1c467099f0
commit 7ceb631518
14 changed files with 69 additions and 369 deletions

View File

@@ -4,7 +4,7 @@ import { beforeEach, describe, it, expect } from "vitest";
import { enUS } from "date-fns/locale";
import { routes } from "@/router";
import { createRouter, createWebHistory, Router } from "vue-router";
import { DEFAULT_PICTURE } from "@/graphql/config";
import { CONFIG } from "@/graphql/config";
import { getMockClient } from "../../mocks/client";
let router: Router;
@@ -32,7 +32,7 @@ const generateWrapper = (
customPostData: Record<string, unknown> = {},
customProps: Record<string, unknown> = {}
) => {
const global_data = getMockClient([DEFAULT_PICTURE]);
const global_data = getMockClient([CONFIG]);
global_data.provide.dateFnsLocale = enUS;
global_data.plugins = [router];
return mount(PostListItem, {