Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

[Server] args in single queries aren't typed correctly #195

Open
Tbaut opened this issue Feb 20, 2020 · 3 comments
Open

[Server] args in single queries aren't typed correctly #195

Tbaut opened this issue Feb 20, 2020 · 3 comments
Milestone

Comments

@Tbaut
Copy link
Contributor

Tbaut commented Feb 20, 2020

e.g the following isn't working

query getBlockByNumber {
  blockNumber(where: {number: 1}){
    id
  }
}

and throws:

{
  "data": {
    "blockNumber": null
  },
  "errors": [
    {
      "message": "Field 'blockNumber' argument 'where' of type 'BlockNumberWhereUniqueInput!' is required but not provided. (line 2, column 3):\n  blockNumber {\n  ^",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "blockNumber"
      ]
    }
  ]
}
@Tbaut Tbaut reopened this Feb 21, 2020
@Tbaut
Copy link
Contributor Author

Tbaut commented Feb 21, 2020

Nope, this one is still there, and I couldn't figure it out :(

edit: what I mean with single query is any query without "s" that expect a where argument.

@pmespresso
Copy link
Contributor

oh..i thought you had dine this one here: #194

@pmespresso
Copy link
Contributor

pmespresso commented Feb 26, 2020

oh i see what you mean now.

so blocknumber index hasn't been @Sequential'ed so so you can only query them by the exact @id which is a random id assigned by prisma. currently the way to get a specific blocknumber is to do blocknumbers(where: {...})[0] which is iffy. Will come back around to this one for v1.5 sync.

@pmespresso pmespresso self-assigned this Feb 26, 2020
@pmespresso pmespresso added this to the v1.0-beta milestone Feb 27, 2020
@pmespresso pmespresso removed their assignment Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants