Additional fixes for firebase login. Capture basic local state.

This commit is contained in:
Patrick Fic
2019-12-06 17:55:00 -08:00
parent 0de42d3fee
commit 9f5753d1b7
15 changed files with 76 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
export default {
authState: null,
selectedNavItem: "Home",
recentItems: []
};

View File

@@ -20,3 +20,15 @@ export const GET_SELECTED_NAV_ITEM = gql`
selectedNavItem @client
}
`;
export const GET_CURRENT_USER = gql`
query GetCurrentUser {
currentUser @client
}
`;
// export const SET_CURRENT_USER = gql`
// mutation SetCurrentUser($user User!){
// setCurrentUser(currentUser: $user)
// }
// `;

View File

@@ -4,6 +4,12 @@ export const typeDefs = gql`
extend type Mutation {
SetCurrentUser(user: User!): User!
}
type User {
displayName: String!,
email: String!,
photoUrl: String!
}
`;
const GET_CURRENT_USER = gql`