add component

This commit is contained in:
Kurt Hutten
2020-10-10 12:23:57 +11:00
parent 1a8bea1b85
commit 78cb17baa4
5 changed files with 40 additions and 13 deletions

View File

@@ -1,3 +1,5 @@
import BlogPost from 'src/components/BlogPost'
export const QUERY = gql`
query BlogPostQuery($id: Int!) {
post(id: $id) {
@@ -16,5 +18,5 @@ export const Empty = () => <div>Empty</div>
export const Failure = ({ error }) => <div>Error: {error.message}</div>
export const Success = ({ post }) => {
return JSON.stringify(post)
return <BlogPost post={post} />
}