Can someone explain why i’m getting `"Cannot query...
# prisma-whats-new
s
Can someone explain why i’m getting
"Cannot query field 'someUserExists' on type 'Query'.
when trying either
someUserExists
or
SomeUserExists
(docs are inconsistent wrt leading capital)? I’m following this tutorial and assumed since there’s a default user schema that this filter would exist
Copy code
query {
  someUserExists(filter: {
    id: "abcdefg"
  })
}
n
@stephenhandley hey, where did you find
someUserExists
? It should be
SomeUserExists
🙂
s
Copy code
{
  "data": null,
  "errors": [
    {
      "message": "Cannot query field 'SomeUserExists' on type 'Query'. (line 2, column 3):\n  SomeUserExists(filter: {\n  ^",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ]
}
n
Ah you are trying to put that into the Playground query editor
But you really need to define a new permission query using the permissions view
s
yeah i was mainly using playground to determine which of those filters are available.. the docs are light on details there
n
You can't use the Playground to experiment with the permission queries
s
ah ok.. how come?
n
you can use the "Permission Playground" however to do it
the reason is it's a different GraphQL schema 🙂
s
ah got it
n
but you can still experiment with the
filter
argument in the normal playground because it's the same
s
ah perfect, my mistake, thanks!
n
cheers 🙏
s
@nilan it would be really helpful if this page https://www.graph.cool/docs/reference/simple-api/filtering-by-field-xookaexai0/#explore-available-filter-criteria enumerated all the generated filters and criteria for a given schema. i.e. lists of things like
Copy code
Filters
`Some${type}Exists`
…

Criteria
`${field}_in`

(if field is relation)
`${field}_some`
`${field}_every`
`${field}_none`
I know there are some examples like that interspersed throughout the documentation but I think a single grouping of them would make learning / using them easier
n
thanks I created a new issue here: https://github.com/graphcool/content/issues/161
😀 1