Releases: hayes/pothos
Release list
@pothos/plugin-drizzle@0.18.1
Patch Changes
- 6424480: Plan fragments on interfaces implemented by a Drizzle object against the object, so
selectdeclared on the interface's fields is merged into the query instead of being skipped and loaded separately. ExportDrizzleInterfaceRefand theDrizzleReftype from the package index.
@pothos/plugin-federation@4.5.1
Patch Changes
- d561d35: Add the
.jsextension to the@apollo/subgraph/dist/typesimport so the published ESM build loads on Node.@apollo/subgraphships noexportsmap and Node's ESM resolver does not guess extensions, so importing@pothos/plugin-federationfrom an ESM package failed withERR_MODULE_NOT_FOUNDon 4.4.3 through 4.5.0. CJS was unaffected.
@pothos/plugin-validation@4.3.2
Patch Changes
- c4857a1: Report validation issues from every field of an input object instead of stopping after the first field that fails. When the type-level schemas for a field fail, the field-level schemas for that field are no longer run against the failed result, list-level schemas now wait for async type-level schemas of list items to complete, type-level schemas still run for list items whose nested fields passed when a sibling item failed, and async nested field failures inside list items no longer reject with a promise chaining error.
@pothos/plugin-drizzle@0.18.0
Minor Changes
-
4105614: Tag each value in a compound cursor, so cursors covering more than one column round trip
Dateandbigintvalues.Compound cursors were serialized with plain JSON, which returns a
Dateas a string and cannot serialize abigintat all. Single-value cursors did not have this problem, so it only surfaced on orderings that named more than one column. Cursors written before this change are still read.Also fixes two crashes reachable from the same orderings: an ordering value of
nullnow compares withIS NULLrather than throwing out of drizzle, and composite primary keys are looked up against the table's own columns, which the postgres dialect does not use when reporting them.Composite primary keys are now used as the tie breaker whether or not their columns are marked
notNull(), since SQL makes primary key columns non-nullable regardless. Previously a key declared withprimaryKey({ columns: [...] })alone was skipped, leaving those connections with the non-unique ordering the tie breaker exists to fix. -
99cf79e: Connection
orderBycan now name an extra selected by the same query, rather than only a column:query({ extras: { titleLength: (table) => sql`length(${table.title})` }, orderBy: { titleLength: "asc" }, });
Pothos orders by the expression, builds the cursor from the value it returns, and compares the expression when paging.
This gives cursors a way to carry a value the column's JavaScript mapping does not preserve. A
timestamp({ mode: 'date' })column is returned as aDate, which only holds milliseconds, so a cursor built from it cannot address a row stored with microsecond precision. Selecting the full value as an extra and ordering by that can. See "Ordering and cursors" in the drizzle plugin docs.
Patch Changes
-
d5211ea: Add the primary key to connection
orderBywhen the ordering is not already unique.A cursor records a row's position in an ordering. When that ordering is not unique,
orderBy: { createdAt: 'desc' }for example, rows sharing a value can be returned in a different order on each query, so paging through the connection may return a row twice, or skip it.Connections ordered by a unique set of non-nullable columns are unchanged. Other connections get the primary key as a trailing order column, and their cursors include the matching values. Cursors created before this change still work: they page from the columns they contain, and the cursors returned by that page contain the full set.
@pothos/plugin-drizzle@0.17.6
Patch Changes
- 265c4c8: Treat
undefinedquery properties as absent when building Drizzle queries. Query callbacks that return a conditional filter (e.g.where: cond ? filter : undefined) previously produced a selection that compared as incompatible with an equivalent selection that omitted the key, causing the field's selection to be dropped.where,orderBy,limit, andoffsetare now normalized before selections are stored, compared, or passed to Drizzle.
@pothos/plugin-federation@4.5.0
Minor Changes
-
7f951c3: Add
FieldSettype that can be used to define selections that can't be expressed with
SelectionFromShape, like selections with inline fragments on union or interface fields:builder.selection( "media { ... on Image { url } ... on Video { url } }" as FieldSet<{ media: Media[]; }>, );
@pothos/tracing-xray@1.1.4
Patch Changes
- 76e06e7: Rebuild with TypeScript 7. Source files now use explicit
.jsimport extensions (enforced by
lint) instead of adding them during the build, and declaration files are emitted by TypeScript
7's compiler. Published output is functionally unchanged.
@pothos/tracing-sentry@1.1.5
Patch Changes
- 76e06e7: Rebuild with TypeScript 7. Source files now use explicit
.jsimport extensions (enforced by
lint) instead of adding them during the build, and declaration files are emitted by TypeScript
7's compiler. Published output is functionally unchanged.
@pothos/tracing-opentelemetry@1.2.1
Patch Changes
- 76e06e7: Rebuild with TypeScript 7. Source files now use explicit
.jsimport extensions (enforced by
lint) instead of adding them during the build, and declaration files are emitted by TypeScript
7's compiler. Published output is functionally unchanged.
@pothos/tracing-newrelic@1.1.4
Patch Changes
- 76e06e7: Rebuild with TypeScript 7. Source files now use explicit
.jsimport extensions (enforced by
lint) instead of adding them during the build, and declaration files are emitted by TypeScript
7's compiler. Published output is functionally unchanged.