File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
packages/gatsby/src/bootstrap Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,27 @@ Pages can be created in three ways:
1313You can also implement the API [ ` onCreatePage ` ] ( /docs/node-apis/#onCreatePage ) to
1414modify pages created in core or plugins or to create client-only pages.
1515
16+ ## Debugging help
17+
18+ To see what pages are being created by your code or plugins, you can query
19+ for page information while developing in Graph* i* QL. Paste the following
20+ query in the Graph* i* QL IDE for your site.
21+
22+ ``` graphql
23+ {
24+ allSitePage {
25+ edges {
26+ node {
27+ path
28+ component
29+ }
30+ }
31+ }
32+ }
33+ ```
34+
35+ You can also query for any ` context ` data you or plugins added to pages.
36+
1637## Creating pages in gatsby-node.js
1738
1839Often you will need to programmatically create pages. For example, you have
Original file line number Diff line number Diff line change @@ -305,6 +305,11 @@ data
305305 await writePages ( )
306306 console . timeEnd ( `write out pages modules` )
307307
308+ // Update Schema for SitePage.
309+ console . time ( `Updating schema` )
310+ await require ( `../schema` ) ( )
311+ console . timeEnd ( `Updating schema` )
312+
308313 const checkJobsDone = _ . debounce ( resolve => {
309314 const state = store . getState ( )
310315 if ( state . jobs . active . length === 0 ) {
You can’t perform that action at this time.
0 commit comments