在我的Gatsby js网站中使用gatsby-drupal-webform时出现此错误:
Failed to compile
GraphQL Error Unknown type "webform__webform". Did you mean "date_format__date_format"?
file: C:/xampp/htdocs/drupal-gatsby-t/node_modules/gatsby-drupal-webform/dist/Webform.jsx
1 |
> 2 | fragment Webform on webform__webform {
| ^
3 | name: drupal_internal__id
4 | description
5 | status
6 | elements {
7 | name
8 | _type
9 | _title
10 | _title_display
11 | _default_value
12 | _description
答案 0 :(得分:1)
我是该模块的作者。此问题中使用的软件包版本较旧,没有我当时未发布的Drupal hack,该软件包就无法正常工作。
我建议通过运行npm install gatsby-drupal-webform@latest --save
然后,您还需要:
access any webform configuration
权限访问Drupal jsonapi。可以通过在basic_auth
设置中为具有该权限的用户的Drupal和setting username and password安装gatsby-source-drupal
模块来完成。您可以查看this example项目。