GraphQL
Table of contents
QraphQL
- StaticQuery
- PageQuery
-
useStaticQuery Hook
- They complete the same task, only the implementation is different.
Simple GraphQL




useStaticQuery Hook


useStaticQuery, graphQL from scratch
Field Alias
-
Using
whatever-namewith:in front ofsiteMetadata,whatever-namewill become the alias.query MyQuery { site { info:siteMetadata { title } } }
Query Keyword, Name and Gatsby Clean
-
MyQueryis the Query Keyword, it requires to be uniquequery MyQuery { site { info:siteMetadata { title } } }
Page Query
- Use plugin: [gatsby-source-filesystem]
allFile - field
- Collection of data

Query Arguments


File Field

sourceInstanceName Arguments

Gallery Setup
