Signin methods working with no errors.

This commit is contained in:
Patrick Fic
2019-12-06 23:42:16 -08:00
parent 4f3d917e06
commit f919025159
4 changed files with 18 additions and 12 deletions

View File

@@ -26,8 +26,14 @@ const authLink = setContext((_, { headers }) => {
}
});
const middlewares = [];
if (process.env.NODE_ENV === "development") {
middlewares.push(apolloLogger);
}
middlewares.push(authLink.concat(httpLink));
export const client = new ApolloClient({
link: authLink.concat(httpLink),
link: ApolloLink.from(middlewares),
cache: new InMemoryCache({ addTypename: false }),
typeDefs,
resolvers