-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Support filtering on array column types #460
Comments
Hey @olirice, i have tested array type with
Array type are well supported in 1.5.1, but still not filtering or ordering operations on them. Is this normal or I am missing something? Cheers |
Filtering is straightforward, we just need to do the work. Also a good first issue if anyone wants to take a swing at it. This is a similar PR implementing the I don't think it's likely that we'll implement ordering based on array types though, that doesn't feel intuitive to me. Please comment if you disagree |
Regarding the filtering, it will indeed prove to be very beneficial for us. Concerning the ordering, you are correct; it is challenging to ascertain the utility of array type sorting. However, given that this feature is present in PostgreSQL (https://www.postgresql.org/docs/9.4/functions-array.html), it could be advantageous in certain scenarios. For us, the primary concern is maintaining consistency across all the operations available for field types. |
Describe the feature request
This feature request aims to add support for filtering operations on array types in
pg_graphql
. Currently,pg_graphql
doesn't support filter operations on any array types, including but not limited to enums and integers as first thought in this ticket.Detailed Description
Array types are a common structure in PostgreSQL, and their utility within GraphQL queries is significant. The ability to filter these arrays directly within GraphQL queries would enhance the power and flexibility of the
pg_graphql
extension.Example Use Case
Consider a table
doc
with an array of enums and an array of integers:The resulting GraphQL schema will be:
In the current setup, users are unable to filter these array fields using pg_graphql. For instance, filtering
doc
records whereenumArr
contains 'VALUE_ONE' orintArr
contains the number 1 is not possible.Expected Behavior
eq
(equals) andcontains
for array fields.Versions:
The text was updated successfully, but these errors were encountered: