Skip to content

Commit

Permalink
Obsessions, Topics, ArticlesByRecommendation queries (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
hallee authored Jan 11, 2021
1 parent a32f968 commit fa6cd08
Show file tree
Hide file tree
Showing 41 changed files with 1,868 additions and 45 deletions.
17 changes: 17 additions & 0 deletions Queries/Articles/ArticlesByRecommendation.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
query ArticlesByRecommendation(
$perPage: Int!
$postId: Int!
) {
posts(
first: $perPage
where: {
recommended: {
id: $postId
}
}
) {
nodes {
...ArticleTeaserParts
}
}
}
28 changes: 28 additions & 0 deletions Queries/Obsessions/Obsessions.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
query Obsessions(
$perPage: Int!
$location: MenuLocationEnum!
){
menuItems(
first: $perPage
where: {
location: $location
}
) {
nodes {
id
connectedObject {
... on Obsession {
...ObsessionParts
posts(
first: 1
) {
nodes {
...ArticleTeaserParts
}
}
}
}
}
}
}

7 changes: 7 additions & 0 deletions Queries/Topics/Topics.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
query Topics {
topics {
nodes {
...TopicParts
}
}
}
12 changes: 12 additions & 0 deletions Schemas/ContentSchema.operations.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions Web/ArticlesByRecommendation.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions Web/Obsessions.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fa6cd08

Please sign in to comment.