Additional fixes for firebase login. Capture basic local state.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export default {
|
||||
authState: null,
|
||||
|
||||
selectedNavItem: "Home",
|
||||
recentItems: []
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
// }
|
||||
// `;
|
||||
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user