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

[BUG] - Error in Graphql "getProposals" query #427

Open
imshashank opened this issue Aug 21, 2022 · 1 comment
Open

[BUG] - Error in Graphql "getProposals" query #427

imshashank opened this issue Aug 21, 2022 · 1 comment

Comments

@imshashank
Copy link

imshashank commented Aug 21, 2022

Briefly describe the bug.

Error in Graphql "getProposals" query for proposal with ID: "0xb4f4449ab9bc07926e37c2197d6a87ee6fd3fa78df37d433705623721d0702c6"

How can we reproduce the bug?

Run this query:

query Proposals {
  proposals(
    orderBy: "created",
    where:{
      id:"0xb4f4449ab9bc07926e37c2197d6a87ee6fd3fa78df37d433705623721d0702c6"
    }
    orderDirection: desc
  ) {
    id
    strategies{
      name
      network
      params
    }
  }
}

Returns error:

{
  "errors": [
    {
      "message": "Cannot return null for non-nullable field Strategy.name.",
      "locations": [
        {
          "line": 39,
          "column": 7
        }
      ],
      "path": [
        "proposals",
        0,
        "strategies",
        0,
        "name"
      ]
    }
  ],
  "data": {
    "proposals": [
      {
        "id": "0xb4f4449ab9bc07926e37c2197d6a87ee6fd3fa78df37d433705623721d0702c6",
        "strategies": [
          null
        ]
      }
    ]
  }
}

What is the expected behaviour?

There should be no error.

Can you attach screenshots?

No response

Can you provide your device specific details below?

Go to -> https://hub.snapshot.org/graphql and run the above query

@samuveth samuveth transferred this issue from snapshot-labs/snapshot Aug 21, 2022
@bonustrack
Copy link
Member

@imshashank This proposal is old it was broadcasted with voting strategies and missing parameters, this is not possible for some time to define strategies when doing a proposal so this wont happen anymore, we just made a fix for that proposal you shouldnt see the error

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

No branches or pull requests

2 participants