sdy

update typeDefs

1 -import gql from "graphql-tag"; 1 +import { gql } from "@apollo/client";
2 2
3 -export const defaults = { 3 +export const typeDefs = gql`
4 - isLoggedIn: Boolean(localStorage.getItem("token") || false), 4 + extend type Query {
5 -}; 5 + isLoggedIn: Boolean!
6 + }
7 +`;
6 8
7 export const resolvers = { 9 export const resolvers = {
8 Mutation: { 10 Mutation: {
...@@ -26,14 +28,4 @@ export const resolvers = { ...@@ -26,14 +28,4 @@ export const resolvers = {
26 return null; 28 return null;
27 }, 29 },
28 }, 30 },
29 - Query: {
30 - checkLogIn: (_, __) => {
31 - const query = gql`
32 - {
33 - isLoggedIn @client
34 - }
35 - `;
36 - return query;
37 - },
38 - },
39 }; 31 };
......