Remplacement du Loader par WithLoader
This commit is contained in:
@ -4,12 +4,11 @@ import { WebSocketLink } from "@apollo/client/link/ws";
|
||||
import { RetryLink } from "@apollo/client/link/retry";
|
||||
import { SubscriptionClient } from "subscriptions-transport-ws";
|
||||
|
||||
|
||||
const subscriptionClient = new SubscriptionClient(Config.subscriptionEndpoint, {
|
||||
reconnect: true
|
||||
reconnect: true,
|
||||
});
|
||||
|
||||
const link = new RetryLink().split(
|
||||
const link = new RetryLink({attempts: {max: 2}}).split(
|
||||
(operation) => operation.operationName === 'subscription',
|
||||
new WebSocketLink(subscriptionClient),
|
||||
new HttpLink({ uri: Config.graphQLEndpoint, credentials: 'include' })
|
||||
|
@ -12,5 +12,5 @@ query userProfile {
|
||||
}`;
|
||||
|
||||
export function useUserProfileQuery() {
|
||||
return useQuery(QUERY_USER_PROFILE, { fetchPolicy: "network-only" });
|
||||
return useQuery(QUERY_USER_PROFILE);
|
||||
}
|
Reference in New Issue
Block a user