Fix graphql query import (#2108)

This commit is contained in:
Lucas Bordeau
2023-10-18 18:31:47 +02:00
committed by GitHub
parent 44099cf8fd
commit 5bfb540e6a

View File

@ -6,10 +6,10 @@ import {
MetadataObjectsQueryVariables, MetadataObjectsQueryVariables,
} from '~/generated-metadata/graphql'; } from '~/generated-metadata/graphql';
import { GET_ALL_OBJECTS } from '../graphql/queries'; import { FIND_MANY_METADATA_OBJECTS } from '../graphql/queries';
import { formatPagedMetadataObjectsToMetadataObjects } from '../utils/formatPagedMetadataObjectsToMetadataObjects'; import { formatPagedMetadataObjectsToMetadataObjects } from '../utils/formatPagedMetadataObjectsToMetadataObjects';
import { useApolloMetadataClient } from './useApolloClientMetadata'; import { useApolloMetadataClient } from './useApolloMetadataClient';
// TODO: test fetchMore // TODO: test fetchMore
export const useFindAllMetadata = () => { export const useFindAllMetadata = () => {
@ -18,7 +18,7 @@ export const useFindAllMetadata = () => {
const { data, fetchMore: fetchMoreInternal } = useQuery< const { data, fetchMore: fetchMoreInternal } = useQuery<
MetadataObjectsQuery, MetadataObjectsQuery,
MetadataObjectsQueryVariables MetadataObjectsQueryVariables
>(GET_ALL_OBJECTS, { >(FIND_MANY_METADATA_OBJECTS, {
client: apolloMetadataClient ?? ({} as any), client: apolloMetadataClient ?? ({} as any),
skip: !apolloMetadataClient, skip: !apolloMetadataClient,
}); });