Skip to content

Conversation

@iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Dec 4, 2023

Description

Added missing filtering options for GraphQl queries to entity getters.

Additional information

  • All entities that have status and tags can be filtered by them.
  • Folder have folder path regex and some boolean filterings.
  • Task have filtering by assignees.
  • Product has name and path regex filter.
  • Representation has option to filter representations with/without links.
  • Event can be filtered by newer/older than and if has children.
  • Workfile info can be filtered by path regex.

Because some of the arguments changed order it may be backwards incompatible change. I know about required changes in openpype repository ynput/OpenPype#5997 , but I hope that's all.

Copy link
Contributor

@Minkiu Minkiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it, but code looks good

@BigRoy
Copy link
Contributor

BigRoy commented Dec 4, 2023

  • Folder have folder path regex and some boolean filterings.

From an API standpoint, does this now allow passing a Python re compiled re.Pattern object to e.g. the name filter functions similar to how the Pymongo API allowed. Basically the API could do a isinstance(value, re.Pattern) and if so make it a regex query instead.

Or what will be the ayon api equivalent to actually make such a query.

Could you show some API query call examples?

@iLLiCiTiT
Copy link
Member Author

iLLiCiTiT commented Dec 4, 2023

From an API standpoint, does this now allow passing a Python re compiled re.Pattern object to e.g. the name filter functions similar to how the Pymongo API allowed.

No.

Or what will be the ayon api equivalent to actually make such a query.

Could you show some API query call examples?

There is not. You can query folders by folder path regex (single regex string, not object). We can probably add more options on server backend when we'll have a usecase that makes sense.

Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clicked around, published from DCC and Publisher, seems fine.

@iLLiCiTiT iLLiCiTiT merged commit 7f8b1c4 into develop Dec 5, 2023
@iLLiCiTiT iLLiCiTiT deleted the enhancement/add-graphql-filtering branch December 5, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants