share-meals / food-guide-toolkit-website

MIT License
2 stars 0 forks source link

pulling SEO attributes in GraphQL query #14

Closed jonathan-chin closed 2 years ago

jonathan-chin commented 2 years ago

need to be able to pull SEO stuff from pages when building out NextJS.

perhaps next step is to create some mock data and play / explore.

jonathan-chin commented 2 years ago

turns out this is easy:

# Write your query or mutation here
{
  page(id: 2){
    data{
      attributes{
        seo{
          title
          description
        }
      }
    }
  }
}

I think the issue before was that the autofill did not show everything, and so you had to know that it was under the seo attribute.