Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react'
- import { graphql } from "gatsby"
- export default ({data}) => {
- return (
- <div>
- <h1>{data.swapi.posts_by_pk.title}</h1>
- <div>{data.swapi.posts_by_pk.description}</div>
- </div>
- )
- }
- export const query = graphql`
- query postsByPk($slug: SWAPI_uuid!) {
- swapi {
- posts_by_pk(id: $slug) {
- id
- title
- created_at
- description
- }
- }
- }
- `;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement