All Articles

Day 14

Data continued, static.

There is this thing called a StaticQuery, to be honest it currently feels exactly like the query we did yesterday. We are only grabbing the site title from the gatsby-config.js

As this is my first real forray into gatsby, it sounds like the static query is a shiny new. Up until this only pages were allowed to do querying?

I wish I could say that whenever I'm confused I go search the docs and find answers that make me feel better. There are great examples of the difference between StaticQuery and page query.

Huh, well since I have no context as to how much of an issue not having static queries around, I'll just have to assume this is a big deal. After all its right there in the basic tutorials, so ...

We can now see the updated header here /contact

Just in case that gets updated yet again, here's a screen shot of it.

updated contact page header, using static query

Bonus - Source Plugins

Since the static thing took less time than expected, its time to dive into part-five.

Nice, over halfway through these!

Finally, we're starting to dig into the whole localhost:8000/__graphql setup.

basic graphql query for site metadata, using graphiql

Not that I understand just how useful this is going to be, but I can tell for certain that I'd not like to try and sort out those data bindings in my head, if that is what they are called.

Lol, lets try to make bad things..

bad graphql queries

Yo dawg, I heard you like children so we childrend your children with some children children children..

Okay maybe not userful per se, but fun to mess about with and see what you can do.