Created
October 24, 2019 04:39
-
-
Save trevorblades/380c99fae4bc445a9382b7a85eb7550e 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 'graphql-tag'; | |
| export const PROJECT_FRAGMENT = gql` | |
| fragment ProjectFragment on Project { | |
| id | |
| name | |
| updatedAt | |
| } | |
| `; | |
| export const FOLDER_FRAGMENT = gql` | |
| fragment FolderFragment on Folder { | |
| id | |
| name | |
| projects { | |
| ...ProjectFragment | |
| } | |
| } | |
| ${PROJECT_FRAGMENT} | |
| `; | |
| export const HOME_PAGE_QUERY = gql` | |
| { | |
| folders { | |
| ...FolderFragment | |
| } | |
| projects(filter: {folderId: null}) { | |
| ...ProjectFragment | |
| } | |
| } | |
| ${FOLDER_FRAGMENT} | |
| ${PROJECT_FRAGMENT} | |
| `; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment