Skip to content

docs: array enum query models - #133

Merged
Theauxm merged 2 commits into
mainfrom
docs/array-enum-query-models
Sep 2, 2026
Merged

docs: array enum query models#133
Theauxm merged 2 commits into
mainfrom
docs/array-enum-query-models

Conversation

@Theauxm

@Theauxm Theauxm commented Sep 2, 2026

Copy link
Copy Markdown
Member

No description provided.

Documents the PostgreSQL array pattern for query models: the mapping and index
setup, the filter surface HotChocolate generates, and which array operator each
list filter compiles to.

Two things worth writing down. The set operators people reach for already exist
under the stock names, so `some: { eq: }`, `some: { in: }` and an AND of two
`some: { eq: }` are contains, contains-any and contains-all, compiling to @>, &&
and paired @> respectively. And HasIndex(...).HasMethod("gin") is not just
schema description: Npgsql reads it when choosing between @> and = ANY for a
single-value membership filter, which makes leaving it off a silent sequential
scan.

Also covers why neq is absent from the element input and what replaces it.
The restricted element and list inputs cannot reuse HotChocolate's stock
{Scalar}OperationFilterInput names. A collection whose element cannot be
restricted, which is any collection of a nullable scalar, keeps the stock types,
and a restricted type claiming a stock name collides with it at schema build.
@Theauxm
Theauxm merged commit 32b9344 into main Sep 2, 2026
2 checks passed
@Theauxm
Theauxm deleted the docs/array-enum-query-models branch September 2, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant