Created
May 30, 2019 19:59
-
-
Save ghankerson/7c7834ed71457615aa4cf2ad70c55885 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import { gql } from 'apollo-boost'; | |
| export function episodesQuery(contextSlug, pageNum) { | |
| return gql` | |
| { | |
| episodesList: collection(contentAreaSlug: "${contextSlug}", slug: "${contextSlug}" ) { | |
| id | |
| title | |
| results(page: ${pageNum}, pageSize: 18) { | |
| nextPage | |
| pageSize | |
| totalPages | |
| totalItems | |
| previousPage | |
| currentPage | |
| items { | |
| id | |
| title | |
| body | |
| resourceType | |
| publishDate | |
| description | |
| canonicalSlug | |
| primaryVisuals { | |
| thumbnail { | |
| aspect_ratios: aspectRatios { | |
| widescreen { | |
| instances { | |
| width | |
| height | |
| url | |
| } | |
| } | |
| uncropped { | |
| instances { | |
| width | |
| height | |
| url | |
| } | |
| } | |
| } | |
| contentArea | |
| dateTaken | |
| dateline | |
| fallback | |
| longCaption | |
| shortCaption | |
| xid | |
| } | |
| } | |
| audio { | |
| title | |
| durationHms | |
| encodings { | |
| httpFilePath | |
| } | |
| } | |
| ... on Link { | |
| destination | |
| } | |
| } | |
| totalItems | |
| nextPage | |
| } | |
| } | |
| } | |
| `; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment