This note is in Hasura.Backends.Postgres.SQL.Value. It is referenced at:
Prepared values are passed to Postgres via text encoding. Explicit type cast for prepared params is needed to distinguish the column types. For example, the parameter for citext column type is generated as ($i)::citext where āiā is parameter position (integer).
Also see https://github.com/hasura/graphql-engine/issues/2818