{"size": 676, "ext": "js", "max_stars_repo_path": "gatsby/src/templates/Pizza.js", "max_stars_repo_name": "BebopVinh/master-gatsby-wes-bos", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "gatsby/src/templates/Pizza.js", "max_issues_repo_name": "BebopVinh/master-gatsby-wes-bos", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "gatsby/src/templates/Pizza.js", "max_forks_repo_name": "BebopVinh/master-gatsby-wes-bos", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.3142857143, "max_line_length": 71, "alphanum_fraction": 0.5103550296}
import { graphql } from 'gatsby';
import React from 'react';

export default function SinglePizzaPage({ data }) {
  const { pizza } = data;
  return (
    <div>
      This is for...{' '}
      <strong style={{ color: 'firebrick' }}>{pizza.name}</strong>{' '}
    </div>
  );
}

// tells the query to expect a slug of type String
export const query = graphql`
  query($slug: String!) {
    pizza: sanityPizza(slug: { current: { eq: $slug } }) {
      name
      id
      image {
        asset {
          fluid(maxWidth: 800) {
            ...GatsbySanityImageFluid
          }
        }
      }
      toppings {
        name
        id
        vegetarian
      }
    }
  }
`;
