-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GraphQL: Samples filtering and ordering (#743)
* feat: add in filtering and ordering to project samples resolver and add ordering to samples resolver * chore: add in tests for filtering and ordering project samples, and fixed scope_items to preserve ordering * chore: add tests for samples ordering * chore: fix rubocop violations * chore: fix rubocop warnings * chore: fix rubocop warnings * chore: fixed last remaining rubocop warning
- Loading branch information
Showing
8 changed files
with
173 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Types | ||
class SampleOrderFieldInputType < BaseEnum # rubocop:disable Style/Documentation | ||
graphql_name 'SampleOrderField' | ||
description 'Field to sort the samples by' | ||
value 'created_at' | ||
value 'updated_at' | ||
end | ||
|
||
class SampleOrderInputType < BaseInputObject # rubocop:disable Style/Documentation | ||
graphql_name 'SampleOrder' | ||
description 'Specify a sort for the samples' | ||
|
||
argument :direction, OrderDirectionType, required: false # rubocop:disable GraphQL/ArgumentDescription | ||
argument :field, SampleOrderFieldInputType, required: true # rubocop:disable GraphQL/ArgumentDescription | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters