Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design2
/
2015104215
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jaehyuk-jang
2021-06-11 01:10:24 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a994f66afac59086dccb40d8cd1927844491a646
a994f66a
1 parent
3b982bb4
use Data fetching for graphql
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
0 deletions
project/packages/web/src/config/URI.ts
project/packages/web/src/gql/create-comment.ts
project/packages/web/src/gql/create-post.ts
project/packages/web/src/gql/get-all-posts.ts
project/packages/web/src/gql/get-some-posts.ts
project/packages/web/src/gql/post-with-comments.ts
project/packages/web/src/config/URI.ts
0 → 100644
View file @
a994f66
export
const
GQL_URI
=
'http://a5784f2e906ca4512adac13dd73dd23a-8e11745c200f4ae4.elb.ap-northeast-2.amazonaws.com:5000/graphql'
;
project/packages/web/src/gql/create-comment.ts
0 → 100644
View file @
a994f66
import
gql
from
'graphql-tag'
;
export
const
CREATE_COMMENT
=
gql
`
mutation CreateComment($input: CreateCommentInput!) {
createComment(input: $input) {
id
author
content
created_date
post_id
}
}
`
;
project/packages/web/src/gql/create-post.ts
0 → 100644
View file @
a994f66
import
gql
from
'graphql-tag'
;
export
const
CREATE_POST
=
gql
`
mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
id
}
}
`
;
project/packages/web/src/gql/get-all-posts.ts
0 → 100644
View file @
a994f66
import
gql
from
'graphql-tag'
;
export
const
GET_ALL_POSTS
=
gql
`
query GetAllPosts {
getAllPosts {
id
title
category
}
}
`
;
project/packages/web/src/gql/get-some-posts.ts
0 → 100644
View file @
a994f66
import
gql
from
'graphql-tag'
;
export
const
GET_SOME_POSTS
=
gql
`
query GetSomePosts($input: GetPostInput!) {
getSomePosts(input: $input) {
category
id
author
title
created_date
}
}
`
;
project/packages/web/src/gql/post-with-comments.ts
0 → 100644
View file @
a994f66
import
gql
from
'graphql-tag'
;
export
const
GET_POST_WITH_COMMENTS
=
gql
`
query GetPostWithComments($post_id: Float!, $inputComment: GetCommentInput!) {
getPost(id: $post_id) {
id
author
category
created_date
title
content
}
getSomeComments(input: $inputComment) {
id
author
content
created_date
}
}
`
;
Please
register
or
login
to post a comment