Hi Vyoma,
I think there are two similar, but different problems:
1 - The query project(id: "3111")...
only works correctly on GraphiQL
I tried locally and I could reproduce this, I’ll register the issue.
While this one is not working, could you try this other query? It should return the data you want, but for all the projects on team. You could then get only the data where project dbid
is 3111.
Remember to replace team-slug
by your team slug:
query {
team(slug: "team-slug") {
projects {
edges {
node {
title
dbid
project_medias {
edges {
node {
media {
url
}
title
tags {
edges {
node {
tag_text
}
}
}
}
}
}
}
}
}
}
}
2 - Permission issue when destroying a Project Media
Team owners can delete any content and team editors can delete only the items created by them.
Could you check what’s the role and status from the user you are using to authenticate, please? And check if the item was created by the same user?
This query shows the role and permission in all teams the authenticated user is associated to:
query {
me {
team_users {
edges {
node {
team {
name
}
role
status
}
}
}
}
}
You also can check the role on your team’s page https://checkmedia.org/<team-slug>
/