Hasura v1.1.0 Release Notes

Release Date: 2020-02-19 // about 4 years ago
  • 🔄 Changelog

    🍱 Server 🗄️

    🍱 Batching queries 📚

    It's now possible to batch queries (close #1812) (#3490):

    query getAuthors {
      authors {
        name
      }
    }
    
    query getArticles {
      articles {
        title
      }
    }
    

    This will return an array of query results:

    [
        {
          "data": {
            "authors": [
              {
                "name": "Sarah"
              },
              {
                "name": "Rachel"
              }
            ]
          }
        },
        {
          "data": {
            "articles": [
              {
                "title": "How to make fajitas"
              },
              {
                "title": "Birthday surprises"
              }
            ]
          }
        }
    ]
    

    👌 Improved logging

    • 🌲 Log time spent consuming request bytes from socket (close #3547) (#3622)
    • ➕ Add request timings and count histograms to telemetry (close #3552) (#3622)

    👌 Improved caching

    • 🛠 Fix unnecessary conditional logic in cache implementations
    • 🛠 Fix Hasura.Cache.Bounded.mkCacheSize to make sure we don't silently wrap or accept 0
    • 🎉 Initial benchmarks for caching (close #3530)

    Other server enhancements

    • 👍 Allow fine(er)-grained dependency tracking when building permissions
    • Caching is now available for recreating event trigger functions
    • 📇 Metadata is now exported without nulls, empty arrays & default values (#3393)
    • 👌 Improved performance for querying functions (close #3349) (#3504)
    • Read cache control header to refresh JWK (close #3301) (#3446)
    • Check database connection in /healthz endpoint (close #2645) (#3440)
    • 🔨 Refactor schema cache (#3394)
    • ➕ Add fast path for server internal metadata migrations (#3686)

    🐛 Bug fixes 🐞

    • 🛠 Fix Postgres query error when updating a column with multiple operators (fix #3432) (#3458)
    • 🛠 Fix error of permission views not being unique for long role names (fix #3444) (#3486)
    • 🛠 Fix JSON/JSONB colums being returned as type String in nested returning of mutations (fix #3365) (#3375)
    • 🛠 Fix absence of "args" input field omits session variable argument and causes custom functions to fail (fix #3576)(#3585)
    • Include scalars types returning by computed fields in generated schema (fix #3650) (#3651)
    • 🛠 Fix cache-control header parsing for JWK (fix #3655) (#3779)
    • 🛠 Fix connection handler in websocket transport not using the UserAuthentication interface to resolve user info (#3509)

    🍱 Console 🖥️

    👍 Computed fields support on console (close #3203) (#3565)

    Computed fields can now be created and managed on the console.

    Other console enhancements

    • ➕ add custom root fields section for views
    • display Postgres version in the about page of the console (close #3461)
    • ➕ add bigint id to frequently used columns (close #3524)
    • ➕ add info button to inform about Hasura Pro
    • 📇 pretty print JSON metadata file during export from the console (close #3690)
    • accept query params for filter/sort in browse table page (close #833)
    • 👍 allow manually editing table row permission rules on console
    • persist RawSql content across screen changes
    • 🚀 show pre-release update notifications with opt out option

    🐛 Bug fixes 🐞

    • 🛠 Fix blank image on remote schemas section in console (fix #2209) (#3574)
    • 🛠 Fix console generating incorrect SQL rollback statement for column default value change (fix #3291) (#3441)
    • 🛠 Fix update event trigger & dropping triggers on run_sql (fix #3803 #3784) (#3833)

    🍱 CLI ⌨️

    👉 Use directory name as argument for init command (#3590)

    The directory name is now available as an argument to init command:

    hasura init my-project
    

    🗄 The --directory flag has been marked as deprecated but can still be used.

    📇 Drop metadata inconsistencies from CLI (close #2766) (#2973)

    🚀 So far, metadata inconsistencies had to be handled using console. As of this release, it's possible to manage metadata inconsistencies using the CLI as well.

    The following new commands are now available:

    hasura metadata inconsistency status
    hasura metadata inconsistency list
    hasura metadata inconsistency drop
    

    📇 There is also an alias ic: hasura metadata ic list

    ➕ Add browser flag to console command (close #3333) (#3601)

    0️⃣ It's now possible to automatically open the hasura console on your favourite browser instead of the default one by running the following command:

    $ hasura console --browser firefox
    INFO console running at: http://localhost:9695/ on firefox
    

    Goto a particular migration version (close #2689) (#3715)

    A --goto flag is now available with the hasura migrate apply command. All up or down migrations till the version mentioned in goto will be applied in order.

    If we have the following state:

    $ hasura migrate status
    VERSION SOURCE STATUS DATABASE STATUS
    ...
    1564701126000 Present Present
    1564701547000 Present Present
    1564702123000 Present Present
    1564702123002 Present Present
    1564702123003 Present Present
    1564738682051 Present Present
    1564738682052 Present Not Present
    1564738682053 Present Not Present
    

    and we execute the following command:

    hasura migrate apply --goto 1564702123002
    

    It will result in the following status:

    $ hasura migrate status
    VERSION SOURCE STATUS DATABASE STATUS
    ...
    1564701126000 Present Present
    1564701547000 Present Present
    1564702123000 Present Present
    1564702123002 Present Present
    1564702123003 Present Not Present
    1564738682051 Present Not Present
    1564738682052 Present Not Present
    1564738682053 Present Not Present
    

    Other CLI Enhancements

    • Examples are now available for all CLI commands (close #3475) (#3492)
    • 🔊 Logs are now displayed as JSON on non-CLI environments (close #2770) (#3528)
    • 👍 Better error handling on unknown API errors: the CLI now prints out the response code and body (close #2954) (#3104)
    • cli(installer): add -f flag to curl (fix #1871) (#3477)
    • 📇 export metadata without nulls, empty arrays & default values (#3393)

    🐛 Bug fixes 🐞

    • 🛠 Fix version constraint for update check (close #3719) (#3730)
    • 🛠 Fix various version-related issues with CLI (close #3706) (#3709)
    • ⚡️ Update go-binddata, fix realize (close #3588) (#3687)
    • Execute down migration in the correct order (#3625)
    • 👍 Better error handling on non-json api responses (close #2954) (#3104)
    • 🛠 Fix squash command not adding the last down (close #3401) (#3569)
    • Mark from flag as required for squash (close #3400) (#3500)

    Docs & community 📄🌈

    • Document explain API (close #870) (#3739)
    • Add information on HASURA_GRAPHQL_PG_CONNECTIONS to docs
    • ⚡️ Update server/CONTRIBUTING.md and include manual build and test steps
    • ⚡️ Update the console README
    • 🛠 Fix Auth0 integration instructions (fix #2655) (#3214) (#3367)
    • ➕ Add Netlify event-trigger echo boilerplate (#2985)
    • ⚡️ Update docs colour scheme (#3586)