BREAKING CHANGES: Converted to use Redux stores. Login now working using Redux.

This commit is contained in:
Patrick Fic
2020-01-31 13:20:15 -08:00
parent f1ac052a1b
commit 3060c16dd3
26 changed files with 628 additions and 360 deletions

View File

@@ -1,5 +1,4 @@
import { onError } from "apollo-link-error";
import { Observable } from "apollo-link";
import { auth } from "../firebase/firebase.utils";
//https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth

View File

@@ -1,31 +0,0 @@
import { gql } from "apollo-boost";
import { GET_CURRENT_USER } from "./local.queries";
export const typeDefs = gql`
extend type Mutation {
SetCurrentUser(user: User!): User!
}
extend type User {
email: String!
displayName: String!
token: String!
}
extend type Jobs {
id: uuid!
}
`;
export const resolvers = {
Mutation: {
setCurrentUser: (_root, { user }, { cache }) => {
cache.writeQuery({
query: GET_CURRENT_USER,
data: { currentUser: user }
});
return user;
}
}
};