mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
apollo broken error handling
This commit is contained in:
parent
9b2822867d
commit
119cf597b7
2 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 : "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue