Replies: 2 comments 3 replies
-
Curious about this as well. Using a similar method to set different Next revalidation properties for different requests. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@RhyG and @fullyherge did you guys found out if creating multiple clients can cause performance issues? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm curious on if there could potentially be performance issues in a React Native app when creating a new client instance (via
new GraphQLClient()
) a bunch of times.Basically I needed a way to dynamically apply authorisation headers that wasn't really supported by any of the other methods. To achieve this I created a custom hook that receives an
auth
param and creates a new client instance with certain headers if it'strue
. This mean every query hook which needs to fetch from our GraphQL endpoint creates its own query client instance. Here's a rough example:Is this opening me up to performance or other issues? I haven't seen any yet, but thought it was worth checking.
Beta Was this translation helpful? Give feedback.
All reactions