apollo broken error handling

This commit is contained in:
feederbox826 2026-04-29 17:54:45 -04:00
parent 9b2822867d
commit 119cf597b7
No known key found for this signature in database
GPG key ID: 82F297A12EBB8A57
2 changed files with 5 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import React, { PropsWithChildren, useMemo } from "react";
import { ApolloError, QueryResult } from "@apollo/client";
import { ApolloError } from "@apollo/client/v4-migration";
import type { useQuery } from "@apollo/client/react";
import { ListFilterModel } from "src/models/list-filter/filter";
import { Pagination, PaginationIndex } from "./Pagination";
import { LoadingIndicator } from "../Shared/LoadingIndicator";
@ -34,8 +35,8 @@ export const LoadedContent: React.FC<
export const PagedList: React.FC<
PropsWithChildren<{
result: QueryResult;
cachedResult: QueryResult;
result: useQuery.Result;
cachedResult: useQuery.Result;
filter: ListFilterModel;
totalCount: number;
onChangePage: (page: number) => void;

View file

@ -1,4 +1,4 @@
import { ApolloError } from "@apollo/client";
import { ApolloError } from "@apollo/client/v4-migration";
export const apolloError = (error: unknown) =>
error instanceof ApolloError ? error.message : "";