Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GqlEdges sorting #1906

Merged
merged 5 commits into from
Jan 13, 2025
Merged

GqlEdges sorting #1906

merged 5 commits into from
Jan 13, 2025

Conversation

louisch
Copy link
Contributor

@louisch louisch commented Jan 7, 2025

What changes were proposed in this pull request?

Provide a sorted field to GqlEdges so that the client may query for a list of edges sorted by some criteria. Currently supports sorting by src ID, dst ID, latest time, earliest time, property value (via properties, i.e. the unified properties), passing in multiple fields to sort by in order of priority, and reversing the sort.

Why are the changes needed?

Timestamp sorting was requested by client

Does this PR introduce any user-facing change? If yes is this documented?

Yes, GraphQL API is currently not documented

How was this patch tested?

Some basic tests run in the GraphQL Playground to test the query, and unit tests were added to python/tests/graphql/test_edge_sorting.py.

Are there any further changes required?

Some improvements to the API to allow for sorting by constant properties and temporal properties specifically could be possible in the future, if need be.

Copy link
Collaborator

@ljeub-pometry ljeub-pometry left a comment

Choose a reason for hiding this comment

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

LGTM

@ljeub-pometry ljeub-pometry merged commit edccce6 into master Jan 13, 2025
19 checks passed
@ljeub-pometry ljeub-pometry deleted the features/graphql-edge-sorting branch January 13, 2025 09:13
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.

2 participants