-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first version of graphql state routing working
- Loading branch information
1 parent
e8beba0
commit e3c4b7d
Showing
12 changed files
with
427 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
4_lit_refactor/3_6_app/src/components/page-view-element.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
4_lit_refactor/3_6_app/src/graphql-store/getAuthor.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
query getAuthor($humanId: String) { | ||
getAuthor(humanId: $humanId) { | ||
_id | ||
humanId | ||
firstName | ||
lastName | ||
pictures { | ||
headerPic | ||
profilePic | ||
cardPic | ||
} | ||
socialMedia { | ||
networkName | ||
count | ||
link | ||
} | ||
categories | ||
typeOfPerson | ||
quotes { | ||
_id | ||
authorId | ||
quote | ||
} | ||
books { | ||
_id | ||
humanId | ||
authorId | ||
title | ||
teaser | ||
image | ||
introduction | ||
reviewText | ||
reviewVideo | ||
keyTakeaways | ||
audioBook | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
# query getAuthor { | ||
# getAuthor(humanId: "darren-hardy") { | ||
# _id | ||
# humanId | ||
# firstName | ||
# lastName | ||
# } | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
// Compute graphql documents statically for performance | ||
export const getAuthor = gql` | ||
query($humanId: String) { | ||
getAuthor(humanId: $humanId) { | ||
_id | ||
humanId | ||
firstName | ||
lastName | ||
} | ||
} | ||
`; |
6 changes: 6 additions & 0 deletions
6
4_lit_refactor/3_6_app/src/graphql-store/getRouteDetails.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
query getRouteDetails { | ||
getRouteDetails @client { | ||
routePath | ||
routeParam | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
4_lit_refactor/3_6_app/src/graphql-store/getRouteDetails.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
export const getRouteDetails = gql` | ||
query { | ||
getRouteDetails @client { | ||
routePath | ||
routeParam | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.