Skip to content

Filtering Arrays of Enums #530

Open
Open
@leefordjudes

Description

@leefordjudes

Describe the bug
#523 pg_graphql 1.5.5 - array with enum type - not working
the above issue & its fixes - fix graphql schema generation issue, and arrayfilter operators.

Now i can use array filter with text[], int[], but i can not filter enum[].
kindly add enum support for array filter.

To Reproduce
Steps to reproduce the behavior:

create type typ_base_account_type as enum (
    'DIRECT_INCOME', 'INDIRECT_INCOME', .. . . . 
    );
create table if not exists account_type
(
    id             int       not null generated by default as identity primary key,
    name           text      not null,
    base_types    typ_base_account_type[] not null,
   -- base_types     text[]    not null,
. . .
);

now insert some records

Expected behavior
Add array filter support for array with enum

Screenshots
ArrayFilter with enum array shows error:
Screenshot 2024-06-12 150424

List enum array works well
Screenshot 2024-06-12 150345

List & ArrayFilter with string, int - works well

Screenshot 2024-06-12 150206

Screenshot 2024-06-12 150250

Versions:

  • PostgreSQL: 16.3
  • pg_graphql 1.5.6

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions