Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-07-17 15:28:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bfeb31ebe59d7b0a2ebf4ef6d84d704538605d9c
bfeb31eb
1 parent
7012a1a1
update typeDefs
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
front/src/Apollo/ClientState.js
front/src/Apollo/ClientState.js
View file @
bfeb31e
import
gql
from
"graphql-tag
"
;
import
{
gql
}
from
"@apollo/client
"
;
export
const
defaults
=
{
isLoggedIn
:
Boolean
(
localStorage
.
getItem
(
"token"
)
||
false
),
};
export
const
typeDefs
=
gql
`
extend type Query {
isLoggedIn: Boolean!
}
`
;
export
const
resolvers
=
{
Mutation
:
{
...
...
@@ -26,14 +28,4 @@ export const resolvers = {
return
null
;
},
},
Query
:
{
checkLogIn
:
(
_
,
__
)
=>
{
const
query
=
gql
`
{
isLoggedIn @client
}
`
;
return
query
;
},
},
};
...
...
Please
register
or
login
to post a comment