Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphql "cannot return null" error when requesting status of auction #670

Open
nikitattt opened this issue Nov 26, 2023 · 0 comments
Open

Comments

@nikitattt
Copy link

When calling the graphql endpoint with a query to retrieve auctions for the community it returns an error if the request contains a status field.

The query that produces an error:

query CommunityByAddress {
  findByAddress(address: "0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03") {
    id
    name
    auctions {
      id
      status
      title
    }
  }
}

Error returned:

{
  "errors": [
    {
      "message": "Cannot return null for non-nullable field Auction.status.",
      "locations": [
        {
          "line": 7,
          "column": 7
        }
      ],
      "path": [
        "findByAddress",
        "auctions",
        44,
        "status"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "Error: Cannot return null for non-nullable field Auction.status.",
            "    at completeValue (/app/packages/prop-house-backend/node_modules/graphql/execution/execute.js:594:13)",
            "    at /app/packages/prop-house-backend/node_modules/graphql/execution/execute.js:486:9",
            "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
            "    at async Promise.all (index 1)",
            "    at async Promise.all (index 44)",
            "    at async Promise.all (index 2)",
            "    at async Promise.all (index 0)",
            "    at execute (/app/packages/prop-house-backend/node_modules/apollo-server-core/src/requestPipeline.ts:500:14)",
            "    at processGraphQLRequest (/app/packages/prop-house-backend/node_modules/apollo-server-core/src/requestPipeline.ts:406:22)",
            "    at processHTTPRequest (/app/packages/prop-house-backend/node_modules/apollo-server-core/src/runHttpQuery.ts:433:24)"
          ]
        }
      }
    }
  ],
  "data": null
}

Other queries that contain auction.status also seem to have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant