github amplication/amplication v0.6.0

latest releases: v2.0.2, v2.0.1, dsg/v4.1.1...
3 years ago

Today, we are excited to release v0.6.0

This version contains breaking changes, you may need to manually resolve conflicts in your custom code. Read below for more details.

GraphQL and REST API advanced search

The search queries in GraphQL and REST API were updated with advanced filtering, sorting, and pagination:

Filters

You can filter the results of your search query by any field of the queried object, with advanced filters like startsWith, Contains and more. The available filters are determined by the data type of each field. (e.g. String. Boolean, DataTime)

query{
  customers(where:{
    firstName:{
      contains:"jack"
    }
  }){
    id
    firstName
    lastName
    createdAt
    updatedAt
  }
}

Sorting

You can sort the results of your search query by using the orderBy parameter

query{
  customers(orderBy:{
    firstName:Asc
  }
  ){
    id
    firstName
    lastName
    createdAt
    updatedAt
  }
}

Paginations

The search queries now support pagination using the skip and take parameters

query{
  customers(
    skip:10,
    take:5
  ){
    id
    firstName
    lastName
    createdAt
    updatedAt
  }
}

Searchable flag

The Searchable flag in the entity field settings now determines whether the records can be searched based on the value of that field.

_Meta query in GraphQL

The new _EntitiesMeta API can be used to get the record count of a query.
The meta query support all the parameters that are supported in the FindMany query.

query{
  _customersMeta(where:{
    firstName:{
      contains:"jack"
    }
  }){
    count
  }
}

The meta query can be used together with the findMany query in order to get the result count.

query customers($where: CustomerWhereInput, $orderBy: CustomerOrderByInput, $skip: Float, $take: Float) {
  items: customers(where: $where, orderBy: $orderBy, skip: $skip, take: $take) {
    id
    createdAt
    updatedAt
    firstName
    lastName
    __typename
  }
  total: _customersMeta(where: $where, orderBy: $orderBy, skip: $skip, take: $take) {
    count
    __typename
  }
}

New Admin UI built with react-admin

New and feature-reach Admin UI was built from scratch using React-Admin.
The new Admin UI includes pagination, sorting, and a master-details view.
The new admin UI is generated to a new folder named "admin-ui".
In case you already generated the admin UI with a previous version and pushed the code to GitHub, the previously generated code is left untouched in the "admin" folder.

Import data schema from Excel file

You can now create a full app, just by importing an Excel file or one of many other flat-file formats (e.g. CSV).
A visual entity diagram allows you to normalize the data schema before you create the app.

Rebuild app without changes

You can now rebuild your app and trigger a sync with GitHub and a deployment to sandbox even without making any changes in your app. The Commit button is available and enabled, so you can use it any time you need it.

Improved code generation

All DTOs, and models are now generated with an additional line break after each property for better readability.

#1346 - Data Service Generator: roles not saving properly
#1193 - Client: I can't set specific permissions to fields
#1314 - Server: Swagger documentation does not match REST-API
#1303 - Client: text search input in the entity field is unreadable
#1327 - Client: browser block popup and client don't alert
#1325 - GitHub Connector: Sync repo on Safari

Big thanks to @jithinlal, @timhuebenerm, @MatanForU, @tupe12334, and @go4cas for reporting these issues.

Credits

Huge thanks to @tupe12334 for helping, and for many members on our Discord server who suggested many of the features released today.

Don't miss a new amplication release

NewReleases is sending notifications on new releases.