【问题标题】:GraphQL error: Internal server error when accessing graphQLGraphQL 错误:访问 graphQL 时出现内部服务器错误
【发布时间】:2020-04-27 05:21:49
【问题描述】:

我在 WP 设置中使用带有 wpgraphql 的 GraphQL。在我更新自定义帖子类型并且它停止工作之前,我一直在使用该服务而没有任何问题。

message: "Internal server error", category: "internal",

但奇怪的是它仍然返回数据以及错误。

在 graphiQL 中执行相同的查询没有任何缺陷。查看请求,唯一的区别是失败的请求不会发送任何 cookie。

我已启用:define( 'WP_DEBUG', true );,但没有显示新错误。

查询比较简单:

{
  rankings {
    edges {
      node {
        rankingId
        id
        commentStatus
        content
        date
        title
        uri
        link
      }
    }
  }
}

【问题讨论】:

    标签: javascript wordpress graphql react-apollo apollo-client


    【解决方案1】:

    使用 define( 'GRAPHQL_DEBUG', true );WPGraphQL

    获取完整的错误消息

    【讨论】:

    • 如果不清楚,应将上述行添加到位于/Users/<YourUserName>/Local Sites/<YourWordPressProject>/app/public/wp-config.php 的名为wp-config.php 的文件中。 :)
    猜你喜欢
    • 2011-03-16
    • 2013-11-28
    • 2020-02-21
    • 2020-02-12
    • 1970-01-01
    • 2019-06-10
    • 2020-07-25
    • 1970-01-01
    • 2018-06-18
    相关资源
    最近更新 更多