ynput / ayon-backend

Server codebase with API access to AYON

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Activities: status.change breaks version.publish

Innders opened this issue · comments

In graphql, when status.change is used with version.publish no versions will be returned. Removing status.change will then return the versions. Other activityTypes seem to have no effect.

"activityTypes": [
    "version.publish",
    "status.change"
  ]

try this query on https://experimental.ayon.dev/explorer

query getEntitiesActivities($projectName: String!, $entityIds: [String!]!, $cursor: String, $last: Int, $referenceTypes: [String!], $activityTypes: [String!]) {
  project(name: $projectName) {
    name
    activities(entityIds: $entityIds, last: $last, before: $cursor, referenceTypes: $referenceTypes, activityTypes: $activityTypes) {
      pageInfo {
        hasPreviousPage
      }
      edges {
        cursor
        node {
          activityId
          activityType
          createdAt
        }
      }
    }
  }
}
{
  "projectName": "no_comment",
  "entityIds": [
    "8362c48007c311efaab4f38ff63a79e6"
  ],
  "last": 30,
  "referenceTypes": [
    "origin",
    "mention",
    "relation"
  ],
  "activityTypes": [
    "version.publish",
    "status.change"
  ]
}

it seems to me that in your example there's just too many status changes and all version publishes are just too old. so... a pagination issue?
image

with the following pagination settings, you'll get two items with different activityType:

"last": 2,
"cursor": "2024-05-01 14:33:23.183145+00:00",