Skip to content

Allow clients to specify GraphQL relationship order#3750

Merged
josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:client-specified-graphql-ordering
May 28, 2026
Merged

Allow clients to specify GraphQL relationship order#3750
josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:client-specified-graphql-ordering

Conversation

@williamjallen
Copy link
Copy Markdown
Collaborator

All relationships currently have a hardcoded ordering by ID, with the direction chosen somewhat arbitrarily based on the expected page render order. This commit switches the default order for all filterable relationships to ID, ascending. This commit also adds the ability for clients to specify an orderBy input parameter which accepts a list of columns and their respective orders. For example: orderBy: [{column: NAME, order: ASC}]. This capability allows us to integrate client-side table sorting with the GraphQL queries used to fill those tables. Additionally, this feature will allow us to use GraphQL to query data for plots throughout the site.

All relationships currently have a hardcoded ordering by ID, with the direction chosen somewhat arbitrarily based on the expected page render order.  This commit switches the default order for all filterable relationships to ID, ascending.  This commit also adds the ability for clients to specify an `orderBy` input parameter which accepts a list of columns and their respective orders.  For example: `orderBy: [{column: NAME, order: ASC}]`.  This capability allows us to integrate client-side table sorting with the GraphQL queries used to fill those tables.  Additionally, this feature will allow us to use GraphQL to query data for plots throughout the site.
Copy link
Copy Markdown
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

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

LGTM

@josephsnyder josephsnyder added this pull request to the merge queue May 28, 2026
Merged via the queue into Kitware:master with commit d80c717 May 28, 2026
7 checks passed
@williamjallen williamjallen deleted the client-specified-graphql-ordering branch May 28, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants