Delete unused code, remove logs, add dnd package.
This commit is contained in:
@@ -25,34 +25,14 @@ const errorLink = onError(
|
||||
}
|
||||
);
|
||||
|
||||
const subscriptionMiddleware = {
|
||||
applyMiddleware: async (options, next) => {
|
||||
options.authToken =
|
||||
auth.currentUser && (await auth.currentUser.getIdToken(true));
|
||||
next();
|
||||
},
|
||||
};
|
||||
//wsLink.subscriptionClient.use([subscriptionMiddleware]);
|
||||
|
||||
// const link = split(
|
||||
// // split based on operation type
|
||||
// ({ query }) => {
|
||||
// const definition = getMainDefinition(query);
|
||||
// // console.log(
|
||||
// // "##Intercepted GQL Transaction : " +
|
||||
// // definition.operation +
|
||||
// // "|" +
|
||||
// // // definition.name.value +
|
||||
// // "##"
|
||||
// // );
|
||||
// return (
|
||||
// definition.kind === "OperationDefinition" &&
|
||||
// definition.operation === "subscription"
|
||||
// );
|
||||
// const subscriptionMiddleware = {
|
||||
// applyMiddleware: async (options, next) => {
|
||||
// options.authToken =
|
||||
// auth.currentUser && (await auth.currentUser.getIdToken(true));
|
||||
// next();
|
||||
// },
|
||||
// wsLink,
|
||||
// httpLink
|
||||
// );
|
||||
// };
|
||||
|
||||
|
||||
const authLink = setContext((_, { headers }) => {
|
||||
return (
|
||||
@@ -84,7 +64,7 @@ const retryLink = new RetryLink({
|
||||
},
|
||||
});
|
||||
|
||||
const cache = new InMemoryCache({});
|
||||
const cache = new InMemoryCache();
|
||||
|
||||
export const client = new ApolloClient({
|
||||
//link: ApolloLink.from(middlewares),
|
||||
|
||||
Reference in New Issue
Block a user