Skip to content

Commit

Permalink
update types for terminatingLink
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Oct 7, 2024
1 parent ac79de2 commit ecfa28a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/api-client/withApollo.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import { NextPage } from 'next';

import {
ApolloClient,
NormalizedCacheObject,
InMemoryCache,
ApolloProvider,
createHttpLink,
InMemoryCache,
ApolloClient,
type ApolloLink,
type NormalizedCacheObject,
} from '@apollo/client';

import type { SchemaLink } from '@apollo/client/link/schema';

import authDirective from '../api/directives/authDirective';

let apolloClient: ApolloClient<NormalizedCacheObject> | undefined;

function createApolloClient() {
let terminatingLink;
function createApolloClient(): ApolloClient<NormalizedCacheObject> {
let terminatingLink: SchemaLink | ApolloLink;
if (typeof window === 'undefined') {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { SchemaLink } = require('@apollo/client/link/schema');
Expand Down

0 comments on commit ecfa28a

Please sign in to comment.