v1.0.0-alpha43
Pre-releaseChangelog
🚨 Breaking change 🚨
You cannot access the current user with current_setting('hasura.user') from custom SQL functions/views anymore. This information is still available inside triggers for mutations. If you are using current user information inside custom functions you'll need to wait for the next release where we will pass user information to custom functions. Unless you know what we are talking about, you are most definitely not affected by this.
🎁 New features 🎁
Recovery from inconsistent metadata
The server now starts even when the metadata is inconsistent. You can then fix/drop this metadata from the console. You can apply a new metadata, execute Hasura Metadata API actions to fix the inconsistencies or drop the inconsistent objects altogether. All this while, Hasura will be serving the GraphQL schema with only the consistent metadata. (closes #231) (#1863)
⚡ Performance improvements for subscriptions ⚡
This release greatly improves the performance of subscriptions backend. Hasura will now let you handle more active subscriptions (at least 10-100x more) while reducing the load on Postgres (CPU usage reduces by 5-10x while number of connections used reduces by 20-40x).
These optimisations only kick in when your susbscriptions meet the following conditions:
- All the variable types are non-nullable scalars.
- All the variables are part of the
wherecondition (i.e, not limit/offset).
Few example,
This susbscription will be optimised:
subscription s ($id: uuid!) {
build(where: {id: {_eq: $id}}) {
status
}
}
This will not be (notice the absence of non-nullable '!' in the declaraton of $id):
subscription s ($id: uuid) {
build(where: {id: {_eq: $id}}) {
status
}
}
This will not be optimised ($condition is not a scalar):
subscription s ($condition: build_bool_exp!) {
build(where: {id: {_eq: $id}}) {
status
}
}
This will not be optimised ($type is nullable, all arguments have to be non-nullable):
subscription s ($category: String! $type: String) {
build(where: {category: {_eq: $category} type: {_eq: $type}) {
status
}
}
We'll document the architecture and the usage patterns more clearly in the coming few days. (#1934)
⚡ Performance improvements for queries ⚡
Reduces the number of trips to Postgres, so your queries will be faster. You'll notice a speedup particularly if the connection between graphql-engine and postgres has high RTT (round trip time). (#1934)
Composite foreign key and primary key support with Console
Console now supports creating composite primary and foreign keys. (close #1707) (#1854)
Bug fixes
- server: fix excessive memory consumption with bulk queries (#1972)
- server: fix incorrect default values for inserts after column drop, fix #1991 (#1993)
- console: fix webhook url edit for event triggers (#1987)
- console: fix fk bug in non-public schemas (#2010)
Other changes
- server: read version from env var during server build time (close #1398) (#1897)
- cli: fix cli contrib instructions (#1958)
- console: fix styles in browse rows, relationship and permission tables (#1969)
- console: update console permissions ui (#1924)
- console: re-add same as other action options in permissions (#1970)
- console: add placeholder for bool type fields while inserting rows (#1962)
- console: fix save function in console's retry config editor (fix #1975) (#1976)
- console: optimise introspection query calls (#1971)
- console: handle permission api shorthands in console (#1986)
- console: show default values as placeholder during insert row (#1985)
- console: make console function fetchTableListBySchema reusable (#2008)
- console: persist explorer / endpoint / headers collapsed state in ApiExplorer (#1992)
- console: refactor permissions types handling (#2009)