sdy

add graphql-tag

1 +import gql from "graphql-tag";
2 +
3 +const clientQuery = gql`
4 + {
5 + isLoggedIn @client
6 + }
7 +`;
8 +
1 export const defaults = { 9 export const defaults = {
2 isLoggedIn: Boolean(localStorage.getItem("token") || false), 10 isLoggedIn: Boolean(localStorage.getItem("token") || false),
3 }; 11 };
...@@ -24,4 +32,7 @@ export const resolvers = { ...@@ -24,4 +32,7 @@ export const resolvers = {
24 return null; 32 return null;
25 }, 33 },
26 }, 34 },
35 + Query: {
36 + clientQuery,
37 + },
27 }; 38 };
......