jaehyuk-jang

use Data fetching for graphql

export const GQL_URI =
'http://a5784f2e906ca4512adac13dd73dd23a-8e11745c200f4ae4.elb.ap-northeast-2.amazonaws.com:5000/graphql';
import gql from 'graphql-tag';
export const CREATE_COMMENT = gql`
mutation CreateComment($input: CreateCommentInput!) {
createComment(input: $input) {
id
author
content
created_date
post_id
}
}
`;
import gql from 'graphql-tag';
export const CREATE_POST = gql`
mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
id
}
}
`;
import gql from 'graphql-tag';
export const GET_ALL_POSTS = gql`
query GetAllPosts {
getAllPosts {
id
title
category
}
}
`;
import gql from 'graphql-tag';
export const GET_SOME_POSTS = gql`
query GetSomePosts($input: GetPostInput!) {
getSomePosts(input: $input) {
category
id
author
title
created_date
}
}
`;
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
}
}
`;