Skip to content

Feature Request: integrate with apollo-link-timeout #235

@komyg

Description

@komyg

Hi,

Is it possible to configure a timeout for the Apollo Link REST calls? I tried to use the Apollo Link Timeout, but it is only working for the standard Graphql calls.

My configuration is this:

const timeoutLink = new ApolloLinkTimeout(Number(process.env.REACT_APP_TIMEOUT));

const restLink = new RestLink({
  credentials: 'include',
  uri: process.env.REACT_APP_API_URL,
});

const httpLink = new HttpLink({
  credentials: 'include',
  uri: process.env.REACT_APP_GRAPHQL_URL,
});


export const apolloClient = new ApolloClient({
  link: ApolloLink.from([authLink, errorLink, timeoutLink, restLink, httpLink]),
  connectToDevTools: true,
  cache: localCache,
  resolvers: localResolvers,
  assumeImmutableResults: true,
});

Am I doing something wrong?

Thanks,
Felipe

/label question

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions