Skip to content

Adding support for filtering on array column types #520

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

Merged
merged 31 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a013f22
adding mock blog posts to seed data
mlabisi May 14, 2024
793254a
adding list type to filterable types
mlabisi May 14, 2024
4f08594
adding array filterops
mlabisi May 14, 2024
fb61169
using modified type for match
mlabisi May 15, 2024
163707e
adding array filter types to transpiler
mlabisi May 15, 2024
91b6b17
adding array filtering to builder
mlabisi May 15, 2024
c425f8f
fixing array filter input fields
mlabisi May 15, 2024
237a0a8
adding list filter types to schema
mlabisi May 15, 2024
809047a
correcting entity name for list filter
mlabisi May 15, 2024
ee149f2
fixup! adding mock blog posts to seed data
mlabisi May 15, 2024
9851b3c
simplifying array filter builders
mlabisi May 15, 2024
4cc6752
un-nesting list filter
mlabisi May 15, 2024
201154d
unwrapping non-nullable types
mlabisi May 15, 2024
a080c4f
enabling ordering by array columns
mlabisi May 15, 2024
0a45e97
disabling ordering by array columns
mlabisi May 15, 2024
83c5ea9
updating failing tests
mlabisi May 16, 2024
384e394
adding test cases for filtering by array columns
mlabisi May 16, 2024
a792bc1
removing archived status from seed data
mlabisi May 17, 2024
c2ee53d
removing extra comment from seed data
mlabisi May 17, 2024
dd9784a
removing unnecessary array handling from create_filters
mlabisi May 17, 2024
498d35c
removing unnecessary spacing change from create_filters
mlabisi May 17, 2024
26be47c
updating docs to include array column filters
mlabisi May 17, 2024
761f226
adding missing result to docs
mlabisi May 17, 2024
e658d83
bumping minor version
mlabisi May 19, 2024
3e3fb84
bumping patch version
mlabisi May 19, 2024
86b11fe
Merge remote-tracking branch 'origin/issue-460' into issue-460
mlabisi May 19, 2024
2e2a6be
removing bump on patch version
mlabisi May 26, 2024
c1a4ebe
removing unwrap
mlabisi May 26, 2024
02c273f
Merge branch 'refs/heads/master' into issue-460
mlabisi May 26, 2024
ca2890b
correcting ov test
mlabisi May 26, 2024
edcf8e0
correcting wording for cd docs
mlabisi May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions dockerfiles/db/setup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ create table blog_post(
blog_id integer not null references blog(id) on delete cascade,
title varchar(255) not null,
body varchar(10000),
tags TEXT[],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This column was added to allow live validation beyond just the regression tests for filtering by array columns!

status blog_post_status not null,
created_at timestamp not null
);
Expand All @@ -79,5 +80,15 @@ values
((select id from account where email ilike 'a%'), 'A: Blog 3', 'a desc3', now()),
((select id from account where email ilike 'b%'), 'B: Blog 3', 'b desc1', now());

insert into blog_post (blog_id, title, body, tags, status, created_at)
values
((SELECT id FROM blog WHERE name = 'A: Blog 1'), 'Post 1 in A Blog 1', 'Content for post 1 in A Blog 1', '{"tech", "update"}', 'RELEASED', NOW()),
((SELECT id FROM blog WHERE name = 'A: Blog 1'), 'Post 2 in A Blog 1', 'Content for post 2 in A Blog 1', '{"announcement", "tech"}', 'PENDING', NOW()),
((SELECT id FROM blog WHERE name = 'A: Blog 2'), 'Post 1 in A Blog 2', 'Content for post 1 in A Blog 2', '{"personal"}', 'RELEASED', NOW()),
((SELECT id FROM blog WHERE name = 'A: Blog 2'), 'Post 2 in A Blog 2', 'Content for post 2 in A Blog 2', '{"update"}', 'RELEASED', NOW()),
((SELECT id FROM blog WHERE name = 'A: Blog 3'), 'Post 1 in A Blog 3', 'Content for post 1 in A Blog 3', '{"travel", "adventure"}', 'PENDING', NOW()),
((SELECT id FROM blog WHERE name = 'B: Blog 3'), 'Post 1 in B Blog 3', 'Content for post 1 in B Blog 3', '{"tech", "review"}', 'RELEASED', NOW()),
((SELECT id FROM blog WHERE name = 'B: Blog 3'), 'Post 2 in B Blog 3', 'Content for post 2 in B Blog 3', '{"coding", "tutorial"}', 'PENDING', NOW());


comment on schema public is '@graphql({"inflect_names": true})';
Loading
Loading