Add blogpost page and cell
This commit is contained in:
20
web/src/components/BlogPostCell/BlogPostCell.js
Normal file
20
web/src/components/BlogPostCell/BlogPostCell.js
Normal file
@@ -0,0 +1,20 @@
|
||||
export const QUERY = gql`
|
||||
query BlogPostQuery($id: Int!) {
|
||||
post(id: $id) {
|
||||
id
|
||||
title
|
||||
body
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const Loading = () => <div>Loading...</div>
|
||||
|
||||
export const Empty = () => <div>Empty</div>
|
||||
|
||||
export const Failure = ({ error }) => <div>Error: {error.message}</div>
|
||||
|
||||
export const Success = ({ post }) => {
|
||||
return JSON.stringify(post)
|
||||
}
|
||||
Reference in New Issue
Block a user