Hey, I’m trying to figure out the best way of querying a document by one of it’s properties and the user identity. Seems like it should be pretty straight forward but i can’t find a solution to it in the forum.
I’ve had success with the below for all users:
type Query {
findPlanByDate(week: String!): Plan
}
But as soon as I update read access permission to the default FQL statement (which I kinda hoped would just work)
I’m already able to CRUD for an authenticated user so that they can only query/mutate their own documents, but I can’t get the index to work in the same manner.
Perhaps I should be querying the user to retrieve the plan via it’s relationship?
type User {
plans: [Plan!] @relation
}
type Plan {
week: String!
owner: User!
}