{"size": 972, "ext": "js", "max_stars_repo_path": "src/services/extractNewsData.js", "max_stars_repo_name": "vikrantrath/gatsbyDemoSEO", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/services/extractNewsData.js", "max_issues_repo_name": "vikrantrath/gatsbyDemoSEO", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/services/extractNewsData.js", "max_forks_repo_name": "vikrantrath/gatsbyDemoSEO", "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": 21.1304347826, "max_line_length": 48, "alphanum_fraction": 0.5072016461}
import { useStaticQuery, graphql } from "gatsby"

export default function() {
  const data = useStaticQuery(graphql`
    {
      allMysqlNews {
        edges {
          node {
            id
            news_cat
            title
            alt_text
            meta_title
            meta_desc
            meta_keywords
            body
            image
            slug
            views
            status
            created_at
          }
        }
      }
    }
  `)
  return data.allMysqlNews.edges.map(e => {
    return {
      id: e.node.id,
      news_cat: e.node.news_cat,
      title: e.node.title,
      alt_text: e.node.alt_text,
      meta_title: e.node.meta_title,
      meta_desc: e.node.meta_desc,
      meta_keywords: e.node.meta_keywords,
      body: e.node.body,
      image: e.node.image,
      slug: e.node.slug,
      month: e.node.month,
      views: e.node.views,
      status: e.node.status,
      created_at: e.node.created_at,
    }
  })
}
