Skip to content

Releases: contember/engine

v1.4.0-rc.1

02 Apr 12:37
Compare
Choose a tag to compare
v1.4.0-rc.1 Pre-release
Pre-release

This release notes covers all changes from 1.4.0-alpha.2 to 1.4.0-rc.1

Highlights

Content Migrations #501

Content migrations within Contember are designed to manage and transform the existing data in your database. This is achieved using GraphQL queries, which provide a powerful and versatile approach to data manipulation.

Read more

personById Tenant Query #516

The personById query is a tenant query that allows you to retrieve a person by their ID.

List of all changes

Content API

  • support interface fragments in GraphQL #508

Tenant API

  • add personById query #516

CLI

  • add migration:blank command for creating a blank migration file
  • print schema commands allow reading from migration files instead of current schema #517
  • print schema prints the schema by lines to fix buffer overflow #525

Migrations

  • Add Content migrations #501

Server

  • add /health endpoint for health checks
  • allow to suppress access logs

Misc

  • fix issues with "typesafe" package, like invalid "coalesce" implementation or undefined value handling #526

Build and dependencies

  • fix invalid base image of "ee" Dockerfile
  • add postgres 16 to test matrix
  • extract migrations-client package #514
  • update runtime dependencies: graphql-tools, graphql, pg
  • update build dependencies: typescript, eslint
  • update to Node 20

Full Changelog: v1.4.0-alpha.2...v1.4.0-rc.1

v1.4.0-alpha.2

08 Dec 12:34
Compare
Choose a tag to compare
v1.4.0-alpha.2 Pre-release
Pre-release

Server and configuration

  • fix prom metrics labels #506
  • allow to change default stage slug #511

Schema and migrations

  • add migration for converting 1:N to 1:1 relation #509
  • fix 1:1 to 1:N converter - it should update inverse relation even not renamed #509

Tenant API

  • fix email validation upon profile change #510

Full Changelog: v1.4.0-alpha.1...v1.4.0-alpha.2

v1.3.6

03 Nov 15:12
Compare
Choose a tag to compare
  • fix prometheus metrics labels

First Alpha of Contember Engine 1.4

01 Nov 12:21
Compare
Choose a tag to compare
Pre-release

This section serves as an introduction to the initial alpha release of version 1.4. It encapsulates various enhancements, optimizations, and new features aimed at improving the overall performance and functionality of the Contember Engine.

Highlighted Updates

Enhanced Date Response Format in Short Date Response #488

Previously, even when utilizing a "date" format, the system would generate a response in the ISO datetime string format. This occurred because node-pg automatically transformed the date into a Date object, which subsequently converted into an ISO string. In this release, we introduce the content.shortDateResponse configuration. Setting this to true activates a succinct response format, addressing the need for a more straightforward date representation.

Optimized GraphQL Schema Creation Process #500

Our examination revealed that the GraphQL schema merging process was considerably resource-intensive, impacting the cold requests. We have successfully optimized this procedure, resulting in a performance boost of up to 10x.

Support for Deferrable Unique Constraints #493

Unique constraints are now configurable to be deferrable, allowing the constraint verification to be postponed until the conclusion of the transaction. This new capability is particularly advantageous when you need to swap the values of two rows in a column marked as unique, such as changing the order of items in a list.

Enhanced Profile Modification through changeMyProfile Mutation #503

The changeMyProfile mutation has been introduced, enabling users to update their name or email address seamlessly.

Improvements in Identity Provider (IdP) API #489

We have implemented several improvements to the IdP API to enhance its functionality and security:

  • Concealment of private configuration parameters during IdP listings.
  • Facilitation of merging with the current configuration when executing the updateIDP command.
  • Enabling the initSignInIDP function to return the current IdP configuration (activation required for each IdP).

Comprehensive List of Changes

Content API Updates

  • Optimization and fix of SQL Queries in Many-Has-Many Relations #502
  • Introduction of opt-in functionality for short date response #488
  • Performance enhancements in Content API GraphQL merging process #500
  • Addition of deferUniqueConstraint transaction option #493
  • Strengthening the safety measures during transaction commit #493

Tenant API Enhancements

  • Implementation of changeMyProfile mutation, empowering users to update their name or email #503
  • Integration of read replicas support for Tenant API #491
  • Implementation of session key prolonging throttling #491
  • IdP improvements #489
    • Concealment of private configuration parameters during IdP listings.
    • Facilitation of merging with current configuration in updateIDP.
    • Enabling return of current IdP configuration in initSignInIDP (activation required for each IdP).

System API Enhancements

  • Integration of read replicas support for System API #491

Schema and Migrations Updates

  • Introduction of unique constraints timing option #493
  • Implementation of strict mode for schema definition (enforcing inverse side and on-delete behavior requirements) #490

1.3.5

01 Nov 11:54
Compare
Choose a tag to compare
  • Optimization and fix of SQL Queries in Many-Has-Many Relations #502
  • Performance enhancements in Content API GraphQL merging process #500

1.3.4

25 Oct 14:39
Compare
Choose a tag to compare

This changelog covers changes for versions >= 1.3.1

1.3.1

1.3.2

  • EE Server: fix prometheus metrics endpoint
  • Actions: fix worker termination race conditions #492

1.3.3

  • Schema migrations: apply correct "on delete" when changing the on delete behaviour
  • Content API: add missing await in delete executor

1.3.4

  • CLI: fix user message in deploy command
  • Schema migrations: fix removing unique constraint #499

v1.3.0

31 Aug 11:30
Compare
Choose a tag to compare

Engine 1.3 release notes

Highlights

Introducing Contember Actions

You can now effortlessly monitor entity changes and trigger webhooks, automating workflows and gaining full control.
Please note that Actions is currently in alpha and some aspects may undergo changes.

Actions documentation

connectOrCreate nested mutation

The new connectOrCreate nested mutation simplifies data management by allowing you to either connect to an existing entity or create a new one, all within a single GraphQL mutation. If the entity exists, it'll be connected; if not, it'll be created.

Introducing unified schema defintion API

We've introduced a unified API for schema definition, encapsulated under a single "c" symbol. Previously, you had to import multiple elements like SchemaDefinition, AclDefinition, and InputValidation from the @contember/schema-definition package. Now, all these APIs are conveniently available under the "c" symbol, simplifying your schema definition process.

Improve orphanRemoval

Orphan removal is a feature that automatically deletes related entities—like content—when you remove a parent entity, such as an article. In this update, we've improved its functionality to work reliably with nested mutations, ensuring that orphaned entities are consistently removed as expected.

More granular invite permissions

The update decouples invite permissions from the general "manage" permissions, allowing for more specific control over invite-related actions. This change maintains backward compatibility while providing the flexibility to set custom rules for invitations.

See #450 for details.

Default "order by" on entity level

The new OrderBy decorator allows you to specify a default sort order for an entity directly in your schema. This eliminates the need to define sorting each time you query the entity.

IdP improvements

We've made several improvements to Identity Provider (IdP) support to enhance developer experience. These updates include adding direct support for Facebook and Apple ID and improving parameter flexibility in GraphQL methods. Changes are backward-compatible and offer more customization options for IdP configurations.

Rewritten deletes

The delete executor has been rewritten to set foreign key constraints directly in the database to their specified values. Permissions are now checked before deletion, making direct database interactions more predictable and aligned with your configurations.

Public Changes

Tenant API

  • IdP related improvements:
    • change signature of initSignInIDP and signInIDP graphql methods to accept generic idp parameters (with a back-compatibility)
    • add direct Facebook IdP support
    • add direct Apple ID Idp support
    • support responseMode in oidc auth init
    • accepts parameters map as an alternative to an URL
    • better "state" validation
    • allow to omit IdP config in updateIDP
    • allow to change IdP type
    • support additional AZP in OIDC client #482
  • allow to paginate project members
  • allow to filter project members by an email, identityId and personId
  • add mutations for modifying global identity roles by #454
  • email normalization - remove whitespaces, lowercase the email #363
  • validate email input in signUp and invite #487
  • better permissions settings for invite #450
  • add member view-only permission to tenant ACL #486
  • disable sign out operation for permanent api keys #441
  • ability to disable person access #440
  • optimize tenant members fetching #468
  • make invitation expiration configurable #472
  • add canDeployEntrypoint to IdentityGlobalPermissions #456
  • add projectSlug to mail template variables #481

Content API

  • rework orphan removal, so it works correctly within nested mutations
  • add new connectOrCreate nested mutation - this allows to connect an entity, or create it, if it does not exist
  • rewrite delete executor: Previously, all foreign key constraints (excluding junction tables) were set to "restrict" and, during deletion, the constraints were deferred and all deletions with appropriate ACL predicates were executed in the engine. After the constraints were fired, the engine checked for any errors due to insufficient permissions. In this refactor, foreign key constraints are set to their chosen values (cascade, set null, restrict), and permissions are checked in the engine before deletion. Only after the engine confirms that the delete operation can be safely executed, will the delete be fired.
  • return correct HTTP error code (400) for some graphql validations by in #464
  • enforce Non-Null constraints on certain mutation inputs #480

CLI

  • add --normalize option to a print schema command. this will e.g. add default roles like admin #446
  • add --until option to migration:execute command allowing to execute only some migrations #448
  • check that there are no mismatches in CLI/packages/services versions #445
  • support sql file import in model #467
  • handle undefined process.stdout.clearLine #474
  • add --no-admin, --no-migrations and --root options to deploy command #456
  • CLI works in single-project mode, when there is no project mapping #483

Schema, definition, migrations

  • default order on entity level using @def.OrderBy decorator
  • Reworked handling of database index and constraint names: This primarily involves internal refactoring to resolve recurring issues linked to mismatches between database index/constraint names and their corresponding schema references. As a result of this change, users will no longer have control over naming indexes in the database.
  • deep merge content and system fields in ACL definition see #449 for details and migration guide
  • schema validation: add skipUntil to skippedErrors by #452
  • allow to copyValue/fillValue when updating column definition #451
  • improve schema definition API - introduce unified c namespace #430
  • model validator improvements #470
  • check for column names collision
  • check that entity is not named Query or Mutation
  • ACL definition: allow to explicitly specify "id" field #469
  • setting presets #476
  • fix order of operations when dropping a view #478
  • order by fixes and improvements #471
    • allow ascNullsFirst/descNullsLast in default relation orderBy / default entity orderBy
    • enum values matches its keys, so you can use the enum when calling a graphql api using an enum
    • allow to pass multiple order by items in OrderBy decorator, deprecate using multiple decorators on a single entity

S3

  • generateUploadUrl graphql mutation accepts S3GenerateSignedUploadInput input object
  • generateUploadUrl supports many new options - size, fileName, suffix, extension, contentDisposition
  • in ACL, you can limit a file size

Enterprise edition:

  • update license to allow usage for testing purposes

Database

  • add connection_started_count metrics

Plugins API:

  • plugins can provide custom system migrations
  • introduce getMasterContainerHook
  • introduce mapper hook
  • plugins can consume individual mutation events like BeforeCreate, AfterCreate etc..
  • custom routes can be attached using a router
  • websockets support
  • introduce "runnable" helpers for workers

Template:

  • drop container after use

Chore:

  • drop pg10 support

Internal changes

Database

  • fixed undefined values handling in update/insert
  • dispose idle connection on error
  • fix connection disposal timeout handling
  • support multiple values in insert
  • support lock modifiers
  • fix empty where handling
  • support LISTEN
  • add scope method

Server

  • add TTL for cached GraphQL schema to avoid mem leaks
  • remove internal middlewares
  • introduce router
  • various logging-related fixes #463

Server EE:

  • add application workers

Schema utils

  • add ACL support to typescript definition generator

DIC:

  • fix calling setups in DIC

Content API:

  • introduce event manager, which fires individual database operations
  • mapper and execution container refactoring
  • use string literals instead of enums in tenant api graphql types

System API:

  • do not use .sql migrations, add snapshot migrations

Tenant API:

  • dispatch pg notification after changing project config
  • do not use .sql migrations, add snapshot migrations

Chore:

  • use tsx in dev
  • fix docker image version tagging
  • update ts, esbuild, tsx

Typesafe

  • pass the path in discriminated union #458

Changes since RC.3

  • allow to filter project members by identityId and personId #485
  • add member view-only permission to tenant ACL #486
  • validate email input in signUp and invite #487

v1.3.0-rc.3

29 Aug 09:05
Compare
Choose a tag to compare
v1.3.0-rc.3 Pre-release
Pre-release

Schema

  • setting presets #476
  • fix drop views order #478

Content API

  • enforce Non-Null constraints on certain mutation inputs #480

Tenant API

  • add projectSlug to mail template variables by @Vrtak-CZ in #481
  • support additional AZP in OIDC client #482

CLI

  • CLI works in single-project mode, when there is no project mapping #483
  • skip version check for some commands #484

Full Changelog: v1.3.0-rc.2...v1.3.0-rc.3

v1.3.0-rc.2

16 Aug 14:14
Compare
Choose a tag to compare
v1.3.0-rc.2 Pre-release
Pre-release

CLI

  • support sql file import in model #467
  • handle undefined process.stdout.clearLine #474
  • add --no-admin, --no-migrations and --root options to deploy command #456

Schema and definition

  • model validator improvements #470
    • check for column names collision
    • check that entity is not named Query or Mutation
  • ACL definition: allow to explicitly specify "id" field #469
  • order by fixes and improvements #471
    • allow ascNullsFirst/descNullsLast in default relation orderBy / default entity orderBy
    • enum values matches its keys, so you can use the enum when calling a graphql api using an enum
    • allow to pass multiple order by items in OrderBy decorator, deprecate using multiple decorators on a single entity

Tenant API

  • optimize tenant members fetching #468
  • make invitation expiration configurable #472
  • add canDeployEntrypoint to IdentityGlobalPermissions #456

Transfer API

  • fix response compress in export endpoint #473

Internal

  • fix snapshot migrations time prefix #459

Full Changelog: v1.3.0-rc.1...v1.3.0-rc.2

v1.3.0-rc.1

20 Jul 12:36
Compare
Choose a tag to compare
v1.3.0-rc.1 Pre-release
Pre-release

Public changes

Server:

  • fix: return correct HTTP error code (400) for some graphql validations by in #464

Internal changes:

  • various logging-related fixes #463
    • send correct level to sentry
    • add projectGroup and project to logger
    • wrap system and tenant requests into a logger scope

Full Changelog: v1.3.0-beta.4...v1.3.0-rc.1