This message was deleted.
# orm-help
s
This message was deleted.
r
A guess, but have you run
prisma deploy
? I've been caught out multiple times by forgetting (particularly to test)
e
Yes I have. Will try again to be super sure.
r
Though, your screenshot is clipped, is
workspaces
a property of the organisation? Or is it a property on the
type Query
?
e
Still same issues.
Here is my schema
r
Isn't your query wrong then? Shouldn't it be
organisations { where: { workspaces: … } }
etc?
e
You are right
It is
Or
`query SETTINGS_QUERY($id: ID!) { organisation(where: { id: $id }) { id name workspaces { id name } } }``
This is my query
I'm trying to return the following from a specific organisation
That organisation can have multiple workspaces however I only want to get the first using the argument (first: 1)
r
I'm still pretty new to graphql, but isn't this what you want?
Copy code
query SETTINGS_QUERY($id: ID!) {
  organisation(where: { 
    id: $id,
    workspaces: { first: 1 } 
  }) {
    id
    name
    workspaces {
      id
      name
    }
  }
}
If that doesn't work, then I'm probably out of my depth!
e
Same here 🙂
Let me try