What happened to includedRoutes ? #30376
-
How do you define this in the latest version? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@KarlBaumann If I'm not mistaken this option was a way to specify REST API routes to include in Gatsby.
Since WPGraphQL is used, there are no longer REST routes to include or exclude. Instead, there's GraphQL Types. While not exact same as the |
Beta Was this translation helpful? Give feedback.
@KarlBaumann If I'm not mistaken this option was a way to specify REST API routes to include in Gatsby.
gatsby-source-wordpress
v4+ no longer uses the WP REST API but instead uses WPGraphQL.Since WPGraphQL is used, there are no longer REST routes to include or exclude. Instead, there's GraphQL Types.
While not exact same as the
includedRoutes
, the new source plugin allows fine-grain control of each Type in the WPGraphQL Schema, allowing for fine-grain control over how many objects of each type are fetched, whether they're included or excluded, etc: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/plugin-options.md#type