1.0 Alpha 5​

This changelog summarizes new features and breaking changes in EdgeDB 1.0 alpha 5 “Luhman”.

EdgeQL​

  • Implement casts between JSON and enums, arrays and tuples (#251). For example, now there’s a way to unpack JSON input into a tuple, which can then be used to populate a new User record:

1. ```
2. with
3. data := <tuple<
4. first_name: str,
5. last_name: str,
6. interests: array<str>
7. >> <json>$input
8. insert User {
9. first_name := data.first_name,
10. last_name := data.last_name,
11. interests := (
12. select
13. Interest
14. filter
15. .label in array_unpack(data.interests)
16. )
17. };
18. ```

20. ```
21. Parameter <json>$input:
22. {
23. "first_name": "Phil",
24. "last_name": "Emarg",
25. "interests": ["fishing", "skiing"]
26. }
27. ```

  • Allow constraints on tuple types (#1576).
  • Allow constraints directly on object types in SDL (#1164)
  • Disallow using exclusive on scalar types (#1575).
  • Proper implementation of set/drop owned.
  • Fix issues with some for statements (#1594).
  • Use fully-qualified names to disambiguate the expressions produced by describe (#1254).
  • Initial implementation of insert … unless conflict … else (#1639)
  • Implementation of more of the features of the new migration syntax (RFC 1000).

GraphQL​

  • Allow several mutation operations in a single mutation query (#1569).
  • Reflect nested aliased types (#722).
  • Enable sorting on non-trivial path (#1642). Here’s an example of sorting movies by the director’s last name and then by the movie’s title:

1. ```
2. {
3. Movie(
4. order: {
5. director: {last_name: {dir: ASC}},
6. title: {dir: ASC}
7. }
8. ) {
9. id
10. title
11. }
12. }
13. ```

  • Add an exists filter operation (#1655). Here’s an example of using it to get records with missing data:

1. ```
2. {
3. Movie(
4. filter: {director: {exists: false}}
5. ) {
6. id
7. title
8. }
9. }
10. ```

CLI​

  • Reworked auth setup via edgedb server init (#91).
  • Initial support for the migrations CLI.
  • Add edgedb server status --all command to list all instances.

Bindings​

  • Add transaction API to JS binding (#61). Here’s an example of using transactions:

1. ```
2. await con.transaction(async () => {
3. await con.execute(`
4. insert Example {
5. name := 'Test Transaction 1'
6. };
7. `);
8. await con.execute("select 1 / 0;");
9. });

11. // nested transactions are supported
12. // and handle save points
13. await con.transaction(async () => {

15. // nested transaction
16. await con.transaction(async () => {
17. await con.execute(`
18. insert Example {
19. name := 'Test Transaction 2'
20. };
21. `);
22. });
23. });
24. ```

  • Add support of connecting to instance by a name (#112).
  • Update the edgedb-js driver to v0.9.0.
  • Update the edgedb-python driver to v0.10.0.