hey all, i'm trying to create a Post via the follo...
# prisma-whats-new
k
hey all, i'm trying to create a Post via the following query:
Copy code
mutation CreatePost {
  createPost(content:"some content", title:"some title", authorId: "cjdv2rl8tbb9f0197g0o9dtm3") {
    id
    title
    content
  }
}
but am getting back an error in the playground:
Copy code
...
"message": "No CONNECT permissions",
...
I recently changed my permissions from wildcard to the following:
Copy code
permissions:
- operation: User.read
  authenticated: true

- operation: User.create
  authenticated: true

- operation: User.update
  authenticated: true

- operation: User.delete
  authenticated: true

- operation: Post.read
  authenticated: true

- operation: Post.create
  authenticated: true

- operation: Post.update
  authenticated: true
  fields:
    - title
    - content
    - mainImageUrl
  query: ./permissions/updatePost.graphql

- operation: Post.delete
  authenticated: true
and then the createPost mutation started throwing that error above. anyone know why, or what that even means?
f
Are you using a script or the playground?
k
the playground
m
If there is a relation between User and Post you'll need a permission for the relationship type (e.g. "- operation: UsersPosts.*")
f
Under Headers in the playground -
Copy code
{
  "Authorization": "Bearer <token>"
}
You can find or create the token in the settings under the console project