【发布时间】:2020-06-28 03:04:23
【问题描述】:
我对 Gatsby 还很陌生,我正在尝试使用 WP 作为内容提供者来构建一个站点。我有一个内置于 WP 的自定义休息路线
wp-json/lbt/v1/settings
现在它刚刚返回
{
"time_and_location": "Testing"
}
我似乎不知道如何在我的 Gatsby 网站的 graphQL 中获得该路线。我将它设置在我的includedRoutes 中
includedRoutes: [
'/*/*/categories',
'/*/*/posts',
'/**/lbt/**',
'/*/*/events',
'/*/*/pages',
'/*/*/media',
'/*/*/tags',
'/*/*/taxonomies',
'/*/*/menus'
],
我在启动 Gatsby 时也看到了这一点
-> wordpress__lbt_v1 fetched : 1
-> wordpress__lbt_settings fetched : 1
我搜索了很多不同的网站,但没有找到任何东西。任何帮助表示赞赏。
【问题讨论】: