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
| type Query { | |
| posts(after: String, before: String, first: Int, last: Int): PostConnection! | |
| } | |
| type PostConnection { | |
| edges: [PostEdge!]! | |
| pageInfo: PageInfo! | |
| } | |
| type PostEdge { |
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
| query ($id: ID!){ | |
| node(id: $id) { | |
| id | |
| ... on Post { | |
| title | |
| } | |
| } | |
| } |
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
| type Query { | |
| post(id: ID!): Post | |
| comment(id: ID!): Comment | |
| user(id: ID!): User | |
| } |
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
| type Node { | |
| id: ID! | |
| } | |
| type Query { | |
| node(id: ID!): Node | |
| } |
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'; | |
| import * as Post from 'Post/fragments'; | |
| import * as Comments from 'Comments/fragments'; | |
| export default gql` | |
| query PostPageQuery($id: ID!) { | |
| post(id: $id) { | |
| ...Post_post | |
| ...Comments_comments |
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'; | |
| import * as UserInfo from 'UserInfo/fragments'; | |
| export const post = gql` | |
| fragment Post_post on Post { | |
| title | |
| content | |
| author { | |
| ...UserInfo_user |
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'; | |
| import * as Comment from 'Comment/fragments'; | |
| export const comments = gql` | |
| fragment Comments_comments on Post { | |
| comments { | |
| id | |
| ...Comment_comment | |
| } |
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
| query PostPageQuery($id: ID!) { | |
| post(id: $id) { | |
| title | |
| content | |
| author { | |
| username | |
| avatar | |
| } | |
| comments { | |
| content |
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'; | |
| import * as UserInfo from 'UserInfo/fragments'; | |
| export const comment = gql` | |
| fragment Comment_comment on Comment { | |
| content | |
| author { | |
| ...UserInfo_user | |
| } |
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 user = gql` | |
| fragment UserInfo_user on User { | |
| username | |
| avatar | |
| } | |
| `; |