Skip to content

Commit

Permalink
Merge pull request #520 from mlabisi/issue-460
Browse files Browse the repository at this point in the history
Adding support for filtering on array column types
  • Loading branch information
imor authored May 31, 2024
2 parents 8b36c68 + edcf8e0 commit 53f0a9d
Show file tree
Hide file tree
Showing 15 changed files with 4,775 additions and 1,881 deletions.
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[],
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

0 comments on commit 53f0a9d

Please sign in to comment.