Closed marcebdev closed 7 years ago
Same thought here. Just faced it. In my case I wanted to add some global SEO tags which are in common among all pages. SEO comes from DatoCms api.
@amirhouieh, @Deathstroke5467 this should be added with #1503. Pull the latest gatsby and you should be good to go. There are still things to improve so if you hit anything unexpected please let us know.
Would be awesome to try to get GraphQL queries on layouts. This way the title, author, etc. could be quickly updated in the gatsby-starter-blog for example. Where as right now you have to change the title in multiple places, with queries on layouts you could simply change the title once and it would update everywhere.
Current solutions is to make a component that can fetch this data and push it into the layout which somewhat defeats the new GraphQL design which is supposed to be a 'pull' not 'push' system.