Skip to content

Commit ab03393

Browse files
authored
fix(docs): dead links sourcing-data -> querying-data (#28651)
1 parent a13827f commit ab03393

21 files changed

+28
-28
lines changed

docs/docs/add-seo-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Adding an SEO Component"
44

55
Every site on the web has basic _meta-tags_ like the title, favicon or description of the page in their `<head>` element. This information gets displayed in the browser and is used when someone shares your website, e.g. on Twitter. You can give your users and these websites additional data to embed your website with more data — and that's where this guide for a SEO component comes in. At the end you'll have a component you can place in your layout file and have rich previews for other clients, smartphone users, and search engines.
66

7-
_Note: This component will use `useStaticQuery`. If you're unfamiliar with that, have a look at the [useStaticQuery documentation](/docs/how-to/sourcing-data/use-static-query/). You also have to have `react-helmet` installed for which you can have a look at [this document](/docs/add-page-metadata)._
7+
_Note: This component will use `useStaticQuery`. If you're unfamiliar with that, have a look at the [useStaticQuery documentation](/docs/how-to/querying-data/use-static-query/). You also have to have `react-helmet` installed for which you can have a look at [this document](/docs/add-page-metadata)._
88

99
## gatsby-config.js
1010

docs/docs/conceptual/building-with-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,4 @@ the Gatsby repo.
175175
### Non-page components
176176

177177
A Non-page component is one that's embedded inside some other component, forming a component hierarchy. An example would be a Header component that's included in multiple page components.
178-
Gatsby uses GraphQL to enable components to declare the data they need. Using the [StaticQuery](/docs/how-to/sourcing-data/static-query/) component or [useStaticQuery hook](/docs/how-to/sourcing-data/use-static-query/), you can colocate a non-page component with its data.
178+
Gatsby uses GraphQL to enable components to declare the data they need. Using the [StaticQuery](/docs/how-to/querying-data/static-query/) component or [useStaticQuery hook](/docs/how-to/querying-data/use-static-query/), you can colocate a non-page component with its data.

docs/docs/conceptual/graphql-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The result of the query is automatically inserted into your React component
8888
on the `data` prop. GraphQL and Gatsby let you ask for data and then
8989
immediately start using it.
9090
91-
**Note:** To run GraphQL queries in non-page components you'll need to use [Gatsby's Static Query feature](/docs/how-to/sourcing-data/static-query/).
91+
**Note:** To run GraphQL queries in non-page components you'll need to use [Gatsby's Static Query feature](/docs/how-to/querying-data/static-query/).
9292
9393
### Understanding the parts of a query
9494

docs/docs/data-fetching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ query {
101101

102102
#### Writing a query to gather the static data needed for a page
103103

104-
With the source plugin installed and added to your config, you can write a [static query](/docs/how-to/sourcing-data/use-static-query/) that will retrieve the necessary data from Gatsby's data layer while building the site.
104+
With the source plugin installed and added to your config, you can write a [static query](/docs/how-to/querying-data/use-static-query/) that will retrieve the necessary data from Gatsby's data layer while building the site.
105105

106106
```jsx:title=src/pages/index.js
107107
import React from "react"

docs/docs/data-storage-redux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The namespaces in Gatsby's Redux store are a great overview of the Gatsby intern
1212
- **[Schema](/docs/schema-generation/)** - GraphQL [schema](/docs/glossary#schema) [inferred](/docs/glossary#inference) from Nodes, available for querying by page and static queries.
1313
- **[Pages](/docs/gatsby-internals-terminology/#page)** - A `Map` of page paths to page objects. Objects made via [Page Creation](/docs/page-creation) contain information needed to render a page such as component file path, page query and context.
1414
- **[Components](/docs/gatsby-internals-terminology/#component)** - A `Map` of component file paths to page objects.
15-
- **[Static Query Components](/docs/static-vs-normal-queries/#keeping-track-of-site-queries-during-build-in-redux-stores)** - A `Map` of any components detected with a [static query](/docs/how-to/sourcing-data/static-query/).
15+
- **[Static Query Components](/docs/static-vs-normal-queries/#keeping-track-of-site-queries-during-build-in-redux-stores)** - A `Map` of any components detected with a [static query](/docs/how-to/querying-data/static-query/).
1616
- **Jobs** - Long-running and CPU-intensive processes, generally started as a side-effect to a GraphQL query. Gatsby doesn’t finish its process until all jobs are ended.
1717
- **webpack** - Config for the [webpack](/docs/webpack-and-ssr/) bundler which handles code optimization and splitting of delivered JavaScript bundles.
1818

docs/docs/glossary/static-site-generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Static site generators are an alternative to database-driven content management
1313

1414
Static site generators, on the other hand, generate HTML pages during a [build](/docs/glossary/#build) process. Gatsby, for example, loads JSON from [GraphQL](/docs/glossary/graphql), and merges that data with components to create HTML pages. These generated pages are then deployed to a web server. When the server receives a request, it responds with rendered HTML. Static pages eliminate the latency that databases introduce.
1515

16-
> Note: It's also possible to use Gatsby [without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/), using the `createPages` API.
16+
> Note: It's also possible to use Gatsby [without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/), using the `createPages` API.
1717
1818
You can also use static site generators to create [JAMStack](/docs/glossary/#jamstack) sites. JAMStack is a modern website architecture that uses JavaScript, content APIs, and markup. Gatsby, for example, can use the [WordPress REST API](/docs/how-to/sourcing-data/sourcing-from-wordpress/) as a data source.
1919

docs/docs/how-to/plugins-and-themes/theme-conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports.onPreBootstrap = ({ store, reporter }) => {
3434

3535
## Separating queries and presentational components
3636

37-
As a theme author, it's preferable to separate your data gathering and the components that render the data. This makes it easier for end users to be able to shadow a component like `PostList` or `AuthorCard` without having to write a [pageQuery](/docs/how-to/querying-data/page-query) or [StaticQuery](/docs/how-to/sourcing-data/static-query).
37+
As a theme author, it's preferable to separate your data gathering and the components that render the data. This makes it easier for end users to be able to shadow a component like `PostList` or `AuthorCard` without having to write a [pageQuery](/docs/how-to/querying-data/page-query) or [StaticQuery](/docs/how-to/querying-data/static-query).
3838

3939
### Page queries
4040

docs/docs/how-to/querying-data/static-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ By using `StaticQuery`, you can colocate a component with its data. It is no lon
4747

4848
### useStaticQuery
4949

50-
There's also a React hooks version of StaticQuery: check out the documentation on [`useStaticQuery`](/docs/how-to/sourcing-data/use-static-query/)
50+
There's also a React hooks version of StaticQuery: check out the documentation on [`useStaticQuery`](/docs/how-to/querying-data/use-static-query/)
5151

5252
### Typechecking
5353

docs/docs/how-to/querying-data/use-static-query.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: Querying Data in Components with the useStaticQuery Hook
44

55
Gatsby v2.1.0 introduces `useStaticQuery`, a new Gatsby feature that provides the ability to use a [React Hook](https://reactjs.org/docs/hooks-intro.html) to query with GraphQL at _build time_.
66

7-
Just like the [StaticQuery](/docs/how-to/sourcing-data/static-query/) component, it allows your React components to retrieve data via a GraphQL query that will be parsed, evaluated, and injected into the component. However, `useStaticQuery` is a hook rather than a component that takes a render prop!
7+
Just like the [StaticQuery](/docs/how-to/querying-data/static-query/) component, it allows your React components to retrieve data via a GraphQL query that will be parsed, evaluated, and injected into the component. However, `useStaticQuery` is a hook rather than a component that takes a render prop!
88

9-
In this guide, you will walk through an example using `useStaticQuery`. If you're not familiar with static queries in Gatsby, you might want to check out [the difference between a static query and a page query](/docs/how-to/sourcing-data/static-query/#how-staticquery-differs-from-page-query).
9+
In this guide, you will walk through an example using `useStaticQuery`. If you're not familiar with static queries in Gatsby, you might want to check out [the difference between a static query and a page query](/docs/how-to/querying-data/static-query/#how-staticquery-differs-from-page-query).
1010

1111
## How to use useStaticQuery in components
1212

docs/docs/how-to/sourcing-data/sourcing-from-private-apis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ From the Gatsby perspective, there is no difference between sourcing from a publ
99
There are 3 approaches that you can use to source data from your private API:
1010

1111
1. If your private API is a GraphQL API, you can use [`gatsby-source-graphql`](/packages/gatsby-source-graphql/).
12-
2. If your private API is not a GraphQL API and you are new to GraphQL, treat the data as unstructured data and fetch it during build time, as described by the guide "[Using Gatsby without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/)". However, as highlighted in the guide, this approach comes with some tradeoffs.
12+
2. If your private API is not a GraphQL API and you are new to GraphQL, treat the data as unstructured data and fetch it during build time, as described by the guide "[Using Gatsby without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/)". However, as highlighted in the guide, this approach comes with some tradeoffs.
1313
3. Create a source plugin, as described in the tutorial "[Source plugin tutorial](/docs/how-to/plugins-and-themes/creating-a-source-plugin/)".
1414

1515
## Other considerations

docs/docs/porting-from-create-react-app-to-gatsby.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Plugins can also pull in data from any number of sources like APIs, CMSs, or the
3333

3434
This data layer simplifies the process of pulling data from different sources and providing them in your pages and components. This combination of data from different sources stitched together in a modern workflow is referred to as [the content mesh](/blog/2018-10-04-journey-to-the-content-mesh/).
3535

36-
> **Note**: GraphQL isn't required for managing data in a Gatsby app. Feel free to look over the guide on [using Gatsby without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/) as well
36+
> **Note**: GraphQL isn't required for managing data in a Gatsby app. Feel free to look over the guide on [using Gatsby without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/) as well
3737
3838
---
3939

docs/docs/programmatically-create-pages-from-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,5 @@ programmatically create pages.
121121
## Other resources
122122

123123
- [Example Repository](https://github.com/jbranchaud/gatsby-programmatic-pages)
124-
- [Using Gatsby without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/)
124+
- [Using Gatsby without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/)
125125
- [CodeSandbox example creating pages from 3rd party data](https://codesandbox.io/s/b84oz)

docs/docs/recipes/pages-layouts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,5 +245,5 @@ export default function DogTemplate({ pageContext: { dog } }) {
245245
### Additional resources
246246

247247
- Tutorial section on [programmatically creating pages from data](/docs/tutorial/part-seven/)
248-
- Reference guide on [using Gatsby without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/)
248+
- Reference guide on [using Gatsby without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/)
249249
- [Example repo](https://github.com/gatsbyjs/gatsby/tree/master/examples/recipe-createPage) for this recipe

docs/docs/recipes/querying-data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default IndexPage
5757

5858
## Querying data with the StaticQuery Component
5959

60-
`StaticQuery` is a component for retrieving data from Gatsby's data layer in [non-page components](/docs/how-to/sourcing-data/static-query/), such as a header, navigation, or any other child component.
60+
`StaticQuery` is a component for retrieving data from Gatsby's data layer in [non-page components](/docs/how-to/querying-data/static-query/), such as a header, navigation, or any other child component.
6161

6262
### Directions
6363

@@ -142,9 +142,9 @@ export default NonPageComponent
142142

143143
### Additional resources
144144

145-
- [More on Static Query for querying data in components](/docs/how-to/sourcing-data/static-query/)
146-
- [The difference between a static query and a page query](/docs/how-to/sourcing-data/static-query/#how-staticquery-differs-from-page-query)
147-
- [More on the useStaticQuery hook](/docs/how-to/sourcing-data/use-static-query/)
145+
- [More on Static Query for querying data in components](/docs/how-to/querying-data/static-query/)
146+
- [The difference between a static query and a page query](/docs/how-to/querying-data/static-query/#how-staticquery-differs-from-page-query)
147+
- [More on the useStaticQuery hook](/docs/how-to/querying-data/use-static-query/)
148148
- [Visualize your data with GraphiQL](/docs/introducing-graphiql/)
149149

150150
## Limiting with GraphQL

docs/docs/recipes/sourcing-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ export default function AllPokemon({ pageContext: { allPokemon } }) {
534534
### Additional resources
535535

536536
- [Full Pokemon data repo](https://github.com/jlengstorf/gatsby-with-unstructured-data/)
537-
- More on using unstructured data in [Using Gatsby without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/)
537+
- More on using unstructured data in [Using Gatsby without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/)
538538
- When and how to [query data with GraphQL](/docs/conceptual/graphql-concepts/) for more complex Gatsby sites
539539

540540
## Sourcing content from Drupal

docs/docs/reference/built-in-components/gatsby-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ _For in-depth install instructions, check out the docs on [Using Gatsby Image](/
3737

3838
### Gatsby image starts with a query
3939

40-
To feed file data in to Gatsby Image, set up a [GraphQL query](/docs/graphql-reference/) and either pass it into a component as props or write it directly in the component. One technique is to leverage the [`useStaticQuery`](/docs/how-to/sourcing-data/use-static-query/) hook.
40+
To feed file data in to Gatsby Image, set up a [GraphQL query](/docs/graphql-reference/) and either pass it into a component as props or write it directly in the component. One technique is to leverage the [`useStaticQuery`](/docs/how-to/querying-data/use-static-query/) hook.
4141

4242
Common GraphQL queries for sourcing images include `file` from [gatsby-source-filesystem](/packages/gatsby-source-filesystem/), and both `imageSharp` and `allImageSharp` from [gatsby-plugin-sharp](/packages/gatsby-plugin-sharp/), but ultimately the options available to you will depend on your content sources.
4343

docs/docs/reference/graphql-data-layer/graphql-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GraphQL is available in Gatsby without a special install: a schema is automatica
1515

1616
Data needs to be [sourced](/docs/content-and-data/) — or added to the GraphQL schema — to be queried and pulled into pages using GraphQL. Gatsby uses [source plugins](/plugins/?=gatsby-source) to pull in data.
1717

18-
**Note**: GraphQL isn't required: you can still [use Gatsby without GraphQL](/docs/how-to/sourcing-data/using-gatsby-without-graphql/).
18+
**Note**: GraphQL isn't required: you can still [use Gatsby without GraphQL](/docs/how-to/querying-data/using-gatsby-without-graphql/).
1919

2020
To source data with an existing plugin you have to install all needed packages. Furthermore you have to add the plugin to the plugins array in the `gatsby-config` with any optional configurations. If you want to source data from the filesystem for use with GraphQL, such as Markdown files, images, and more, refer to the [filesystem data sourcing docs](/docs/how-to/sourcing-data/sourcing-from-the-filesystem) and [recipes](/docs/recipes/sourcing-data).
2121

@@ -84,7 +84,7 @@ StaticQuery is a built-in component for retrieving data from Gatsby’s data lay
8484

8585
You can only have one `StaticQuery` per page: in order to include the data you need from multiple sources, you can use one query with multiple [root fields](/docs/conceptual/graphql-concepts/#query-fields). It cannot take variables as arguments.
8686

87-
Also, refer to the [guide on querying data in components with static query](/docs/how-to/sourcing-data/static-query/).
87+
Also, refer to the [guide on querying data in components with static query](/docs/how-to/querying-data/static-query/).
8888

8989
#### Params
9090

@@ -137,7 +137,7 @@ The `useStaticQuery` hook can be used similar to `StaticQuery` in any component
137137

138138
Because it is a React hook, the [rules of hooks](https://reactjs.org/docs/hooks-rules.html) apply and you'll need to use it with React and ReactDOM version 16.8.0 or later. Because of how queries currently work in Gatsby, only one instance of `useStaticQuery` is supported in each file.
139139

140-
Also, refer to the [guide on querying data in components with useStaticQuery](/docs/how-to/sourcing-data/use-static-query/).
140+
Also, refer to the [guide on querying data in components with useStaticQuery](/docs/how-to/querying-data/use-static-query/).
141141

142142
#### Params
143143

docs/docs/reference/release-notes/migrating-from-v1-to-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default function Home(props) {
218218

219219
#### 5. Change the query to use `StaticQuery`
220220

221-
If you were using the `data` prop in your Gatsby v1 layout, you now need to use Gatsby v2’s [StaticQuery feature](/docs/how-to/sourcing-data/static-query/). This is because a layout is now a normal component.
221+
If you were using the `data` prop in your Gatsby v1 layout, you now need to use Gatsby v2’s [StaticQuery feature](/docs/how-to/querying-data/static-query/). This is because a layout is now a normal component.
222222

223223
Replacing a layout's query with `StaticQuery`:
224224

docs/docs/sourcing-from-graphcms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Using the generated schema, we can begin to write GraphQL queries for Gatsby dat
138138

139139
### Query implementation
140140

141-
Gatsby offers two means of data querying: [page queries](/docs/how-to/querying-data/page-query) and [static queries](/docs/how-to/sourcing-data/static-query).
141+
Gatsby offers two means of data querying: [page queries](/docs/how-to/querying-data/page-query) and [static queries](/docs/how-to/querying-data/static-query).
142142

143143
#### Page query
144144

docs/docs/static-vs-normal-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Static queries differ from Gatsby page queries in a number of ways. For pages, G
1010

1111
In contrast, static queries do not take variables. This is because static queries are used inside specific components, and can appear lower in the component tree. Data fetched with a static query won't be dynamic (i.e. **they can't use variables**, hence the name "static" query), but they can be called at any level in the component tree.
1212

13-
_For more information on the practical differences in usage between static and normal queries, refer to the guide on [static query](/docs/how-to/sourcing-data/static-query/#how-staticquery-differs-from-page-query). This guide discusses the differences in how they are handled internally by Gatsby_
13+
_For more information on the practical differences in usage between static and normal queries, refer to the guide on [static query](/docs/how-to/querying-data/static-query/#how-staticquery-differs-from-page-query). This guide discusses the differences in how they are handled internally by Gatsby_
1414

1515
## Keeping track of site queries during build in Redux stores
1616

0 commit comments

Comments
 (0)