Support of pg_trgm with ranking
Currently I have the query
create index on pub.product using gin (title gin_trgm_ops);
select title
from pub.product
where title %> 'search phrase'
order by title <->> 'search phrase';
I will be grateful for adding this functionality to the library, or instructions on how to write this plugin yourself.
I'm not familiar with pg_trgm, but it should definitely be doable. As a starting point, consider looking at https://github.com/graphile-contrib/postgraphile-plugin-connection-filter-postgis which extends this plugin with PostGIS-specific operators.
Caveat: if you need ORDER BY, there'll be more work involved. This plugin is only concerned with augmenting the WHERE clause.
I'm interested, too. Do you have some code example for fetching all text/varchar columns, that are covered by an index using gist or gin?
Probably the fulltext plugin could be a related use case: https://github.com/mlipscombe/postgraphile-plugin-fulltext-filter