admin管理员组

文章数量:1022442

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,
      },
    },
  },
});

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,
      },
    },
  },
});

本文标签: javascripthow to increase maximum operation depth in strapi graphqlStack Overflow