最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - how to increase maximum operation depth in strapi graphql - Stack Overflow

programmeradmin1浏览0评论

here is the problem in graphql playground of strapi v4. says:

    "error": {
    "errors": [
      {
        "message": "'' exceeds maximum operation depth of 7",
        "locations": [
          {
            "line": 19,
            "column": 19
          }
        ],
        "extensions": {
          "code": "GRAPHQL_VALIDATION_FAILED",
          "exception": {
            "stacktrace": [
...

the maximum operation exceed in graphQL strapi

here is the problem in graphql playground of strapi v4. says:

    "error": {
    "errors": [
      {
        "message": "'' exceeds maximum operation depth of 7",
        "locations": [
          {
            "line": 19,
            "column": 19
          }
        ],
        "extensions": {
          "code": "GRAPHQL_VALIDATION_FAILED",
          "exception": {
            "stacktrace": [
...

the maximum operation exceed in graphQL strapi

Share Improve this question edited Feb 28, 2022 at 14:34 Ahmad Joya asked Feb 28, 2022 at 14:08 Ahmad JoyaAhmad Joya 3771 gold badge4 silver badges10 bronze badges 1
  • 1 Please edit your question to remove the solution part and post it as an answer – Bergi Commented Feb 28, 2022 at 14:12
Add a ment  | 

1 Answer 1

Reset to default 7

Actually I found the problem and here is the solution. you just need to create a file inside of the config folder and then name it to plugins.js. and add these configuration inside of it. then samply increase the value of depthLimit to any depth level which you need.

module.exports = ({ env }) => ({
  graphql: {
    config: {
      endpoint: "/graphql",
      shadowCRUD: true,
      playgroundAlways: false,
      depthLimit: 7,
      amountLimit: 100,
      apolloServer: {
        tracing: false,
      },
    },
  },
});

发布评论

评论列表(0)

  1. 暂无评论