Skip to content

Commit

Permalink
Merge branch 'master' into fix/static-image-formats-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Dec 15, 2020
2 parents 34a6a9b + 1c750b6 commit 7faa8e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benchmarks/source-wordpress/scripts/updater.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fetchGraphql = require(`gatsby-source-wordpress-experimental/utils/fetch-graphql`)
const fetchGraphql = require(`gatsby-source-wordpress-experimental/dist/utils/fetch-graphql`)
.default

const faker = require(`faker`)
Expand Down
9 changes: 5 additions & 4 deletions docs/docs/file-system-route-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ export default function Component(props) {
// to connect to this GraphQL query.

export const query = graphql`
query ($id: String) {
query($id: String) {
product(id: { eq: $id }) {
fields {
sku
}
}
}
}
`
```

If you need to customize the query used for collecting the nodes (e.g. filtering out any product of type "Food"), you should use the [`createPages`](/docs/node-apis#createPages) API instead as File System Route API doesn't support this at the moment.
Expand Down Expand Up @@ -170,7 +170,8 @@ export default function HomePage(props) {
<ul>
{props.data.allProduct.map(product => (
<li key={product.name}>
<Link to={product.productPath}>{product.name}</Link> (<Link to={product.discountPath}>Discount</Link>) // highlight-line
<Link to={product.productPath}>{product.name}</Link> (
<Link to={product.discountPath}>Discount</Link>) // highlight-line
</li>
))}
</ul>
Expand All @@ -185,7 +186,7 @@ export const query = graphql`
discountPath: gatsbyPath(filePath: "/discounts/{Product.name}") // highlight-line
}
}
}
`
```

By using [aliasing](/docs/graphql-reference/#aliasing) you can use `gatsbyPath` multiple times.
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-sharp/src/image-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export async function generateImageData({
file,
args: {
...options,
...args.transformOptions,
...transformOptions,
fit,
cropFocus,
toFormatBase64: args.blurredOptions?.toFormat,
Expand Down

0 comments on commit 7faa8e4

Please sign in to comment.