I have a React-Native app where I make requests to a GraphQL server. Everything works fine except I need a way to set the timeout on the request/client to 5 or 10 seconds. Currently the request takes a very long time before it times out (around 1 minute).
Here's a quick example of how I use the client.
const client = new ApolloClient({
networkInterface: createNetworkInterface({
uri: `${config.server_hostname}/graphql`
})
});
client.query({ query: gqlString });
I have been unable to find any solution through StackOverflow, google search or Apollo's documentation.