graphile-contrib/postgraphile-plugin-connection-filter

Type names are different between v4 and v5

hos opened this issue · 0 comments

hos commented

In the TableFilter type for domains, the type name sometimes is a string and sometimes it's the domain name. In v4 the type is always named as the domain.

For this table

drop schema if exists public cascade;
create schema public;

create extension if not exists citext with schema public;

drop domain if exists public.email cascade;
create domain public.email as public.citext
  check ( value ~ '^[a-zA-Z0-9.!#$%&''*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$' );

drop table if exists public.users cascade;
create table public.users (
  id text not null primary key,
  email public.email not null unique
);

I get this type when running ouch-my-finger

[includes](http://[::1]:5678/graphql#): [String](http://[::1]:5678/graphql#)
Contains the specified string (case-sensitive).

[notIncludes](http://[::1]:5678/graphql#): [**String**](http://[::1]:5678/graphql#)
Does not contain the specified string (case-sensitive).

[includesInsensitive](http://[::1]:5678/graphql#): [**Email**](http://[::1]:5678/graphql#)
Contains the specified string (case-insensitive).

[notIncludesInsensitive](http://[::1]:5678/graphql#): [Email](http://[::1]:5678/graphql#)
Does not contain the specified string (case-insensitive).

[startsWith](http://[::1]:5678/graphql#): [String](http://[::1]:5678/graphql#)
Starts with the specified string (case-sensitive).

[notStartsWith](http://[::1]:5678/graphql#): [String](http://[::1]:5678/graphql#)

As you can see sometimes it named String, sometimes Email. Is this a bug?