Skip to content

Releases: hayes/pothos

@pothos/plugin-drizzle@0.18.1

Choose a tag to compare

@github-actions github-actions released this 05 Sep 06:37
c3558ae

Patch Changes

  • 6424480: Plan fragments on interfaces implemented by a Drizzle object against the object, so select declared on the interface's fields is merged into the query instead of being skipped and loaded separately. Export DrizzleInterfaceRef and the DrizzleRef type from the package index.

@pothos/plugin-federation@4.5.1

Choose a tag to compare

@github-actions github-actions released this 03 Sep 16:51
65edd79

Patch Changes

  • d561d35: Add the .js extension to the @apollo/subgraph/dist/types import so the published ESM build loads on Node. @apollo/subgraph ships no exports map and Node's ESM resolver does not guess extensions, so importing @pothos/plugin-federation from an ESM package failed with ERR_MODULE_NOT_FOUND on 4.4.3 through 4.5.0. CJS was unaffected.

@pothos/plugin-validation@4.3.2

Choose a tag to compare

@github-actions github-actions released this 25 Aug 22:31
60206a7

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

Choose a tag to compare

@github-actions github-actions released this 21 Aug 02:07
73cf601

Minor Changes

  • 4105614: Tag each value in a compound cursor, so cursors covering more than one column round trip Date and bigint values.

    Compound cursors were serialized with plain JSON, which returns a Date as a string and cannot serialize a bigint at 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 null now compares with IS NULL rather 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 with primaryKey({ columns: [...] }) alone was skipped, leaving those connections with the non-unique ordering the tie breaker exists to fix.

  • 99cf79e: Connection orderBy can 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 a Date, 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 orderBy when 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

Choose a tag to compare

@github-actions github-actions released this 18 Aug 20:51
8c840d6

Patch Changes

  • 265c4c8: Treat undefined query 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, and offset are now normalized before selections are stored, compared, or passed to Drizzle.

@pothos/plugin-federation@4.5.0

Choose a tag to compare

@github-actions github-actions released this 23 Jul 19:25
293fbac

Minor Changes

  • 7f951c3: Add FieldSet type 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

Choose a tag to compare

@github-actions github-actions released this 08 Jul 23:28
3f6fac5

Patch Changes

  • 76e06e7: Rebuild with TypeScript 7. Source files now use explicit .js import 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

Choose a tag to compare

@github-actions github-actions released this 08 Jul 23:28
3f6fac5

Patch Changes

  • 76e06e7: Rebuild with TypeScript 7. Source files now use explicit .js import 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

Choose a tag to compare

@github-actions github-actions released this 08 Jul 23:27
3f6fac5

Patch Changes

  • 76e06e7: Rebuild with TypeScript 7. Source files now use explicit .js import 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

Choose a tag to compare

@github-actions github-actions released this 08 Jul 23:28
3f6fac5

Patch Changes

  • 76e06e7: Rebuild with TypeScript 7. Source files now use explicit .js import 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.