Commit Graph

106 Commits

Author SHA1 Message Date
Rikin Kachhia
c2fdcd0471
console: optimise count fetch in data browser (#4692)
* in table-browse-rows, make intelligent count

* update changelog

* simplify getting estimatedCount

* prevent doubled requests

* hide estimated count

* update changelog

* Update CHANGELOG.md

Co-authored-by: Rishichandra Wawhal <rishi@hasura.io>
Co-authored-by: Aleksandra Sikora <ola.zxcvbnm@gmail.com>
2020-05-06 23:37:56 +05:30
Can Taşpınar
9d815598cc
cli: include new commands in help text (fix #4623) (#4626) 2020-05-05 09:21:20 +05:30
surendran82
5998d22231
console: add read replica support section to pro popup (#4118) 2020-05-02 14:41:40 +05:30
Rikin Kachhia
c2df714e5d
docs: update migrations docs (#3403) 2020-04-29 13:30:26 +05:30
Rikin Kachhia
35a50bb28b
docs: update actions documentation (#4586) 2020-04-29 13:16:02 +05:30
Tirumarai Selvan
7f0e47c44e
ready changelog for v1.2 (#4591) 2020-04-29 11:56:19 +05:30
Shraddha Agrawal
88685736c7
Merge branch 'master' into init-current-directory 2020-04-28 18:35:00 +05:30
Shraddha Agrawal
d95d6378e8
cli: add support for servers with self-signed certs (fix #4564) (#4582)
Co-Authored-By: Marion Schleifer <marion@hasura.io>
2020-04-28 17:29:57 +05:30
Shraddha Agrawal
1002d20a0a
Merge branch 'master' into init-current-directory 2020-04-28 02:27:23 +05:30
Marion Schleifer
3ba344befb
docs: data validations (close #4085) (#4260) 2020-04-28 00:32:15 +05:30
Auke Booij
ee7c7b1672
server: allow computed fields to have access to Hasura's session variables (fix #3846) (#4486)
* Allow computed fields to have access to Hasura's session variables

* Inform about session args for computed fields in changelog and docs

* Add tests for session arguments for computed fields (and the respective errors)

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
2020-04-27 17:07:03 +02:00
Aravind
98906e6c5f
Merge branch 'master' into init-current-directory 2020-04-27 16:51:16 +05:30
Rishichandra Wawhal
74563402d4
console: update and freeze graphiql explorer to support operation transforms (#4567) 2020-04-27 16:46:09 +05:30
Aleksandra Sikora
4746be2018
console: fix table columns type comparision during column edit (close #4125) (#4393) 2020-04-27 16:13:22 +05:30
Aleksandra Sikora
79a3b6131d
console: make graphiql panel use whole height (#4553) 2020-04-27 14:32:39 +05:30
Shraddha Agrawal
9c06c2998a update CHANGELOG.md 2020-04-26 22:35:39 +05:30
Shraddha Agrawal
38529b3960
cli: remove irrelevant flags from init command (close #4508) (#4549) 2020-04-25 11:33:13 +05:30
Shahidh K Muhammed
41d3595aab
tag release v1.2.0-beta.5 (#4555) 2020-04-24 19:56:51 +05:30
Antoine Leblanc
66e18b7dee
console: support materialized views (close #91) (#4270) 2020-04-24 15:13:42 +05:30
Rakesh Emmadi
d52bfcda4e
backend only insert permissions (rfc #4120) (#4224)
* move user info related code to Hasura.User module

* the RFC #4120 implementation; insert permissions with admin secret

* revert back to old RoleName based schema maps

An attempt made to avoid duplication of schema contexts in types
if any role doesn't possess any admin secret specific schema

* fix compile errors in haskell test

* keep 'user_vars' for session variables in http-logs

* no-op refacto

* tests for admin only inserts

* update docs for admin only inserts

* updated CHANGELOG.md

* default behaviour when admin secret is not set

* fix x-hasura-role to X-Hasura-Role in pytests

* introduce effective timeout in actions async tests

* update docs for admin-secret not configured case

* Update docs/graphql/manual/api-reference/schema-metadata-api/permission.rst

Co-Authored-By: Marion Schleifer <marion@hasura.io>

* Apply suggestions from code review

Co-Authored-By: Marion Schleifer <marion@hasura.io>

* a complete iteration

backend insert permissions accessable via 'x-hasura-backend-privilege'
session variable

* console changes for backend-only permissions

* provide tooltip id; update labels and tooltips;

* requested changes

* requested changes

- remove className from Toggle component
- use appropriate function name (capitalizeFirstChar -> capitalize)

* use toggle props from definitelyTyped

* fix accidental commit

* Revert "introduce effective timeout in actions async tests"

This reverts commit b7a59c19d6.

* generate complete schema for both 'default' and 'backend' sessions

* Apply suggestions from code review

Co-Authored-By: Marion Schleifer <marion@hasura.io>

* remove unnecessary import, export Toggle as is

* update session variable in tooltip

* 'x-hasura-use-backend-only-permissions' variable to switch

* update help texts

* update docs

* update docs

* update console help text

* regenerate package-lock

* serve no backend schema when backend_only: false and header set to true

- Few type name refactor as suggested by @0x777

* update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* fix a merge bug where a certain entity didn't get removed

Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Rishichandra Wawhal <rishi@hasura.io>
Co-authored-by: rikinsk <rikin.kachhia@gmail.com>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-04-24 14:40:53 +05:30
Rakesh Emmadi
6f100e0009
improve debug information in actions errors response (close #4031) (#4432)
* config options for internal errors for non-admin role, close #4031

More detailed action debug info is added in response 'internal' field

* add docs

* update CHANGELOG.md

* set admin graphql errors option in ci tests, minor changes to docs

* fix tests

Don't use any auth for sync actions error tests. The request body
changes based on auth type in session_variables (x-hasura-auth-mode)

* Apply suggestions from code review

Co-Authored-By: Marion Schleifer <marion@hasura.io>

* use a new sum type to represent the inclusion of internal errors

As suggested in review by @0x777
-> Move around few modules in to specific API folder
-> Saperate types from Init.hs

* fix tests

Don't use any auth for sync actions error tests. The request body
changes based on auth type in session_variables (x-hasura-auth-mode)

* move 'HttpResponse' to 'Hasura.HTTP' module

* update change log with breaking change warning

* Update CHANGELOG.md

Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-04-24 13:25:51 +05:30
Rakesh Emmadi
b51a8ece4d
fix creating relationships for custom object types with fields reusing Postgres scalars (fix #4447) (#4455)
* fix creating relationships for custom object types with fields reusing Postgres scalars, close #4447

* fix changelog entry

* rearrange entries

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-04-24 10:58:42 +05:30
Rishichandra Wawhal
2e7e54fc2e
console: preserve the returning field set in a derived action (#4530) 2020-04-23 18:27:42 +05:30
Marion Schleifer
b3d814e56f
docs: add mapping of hasura operators - pg operators (close #4056) (#4502) 2020-04-23 17:36:54 +05:30
Shraddha Agrawal
eb7acdbd71
docs: add reference docs for cli (fix #4327) (#4408)
Co-Authored-By: Marion Schleifer <marion@hasura.io>
2020-04-23 11:27:45 +05:30
Shraddha Agrawal
75d35ac2f6
cli: add suport for .env file (fix #4129) (#4454) 2020-04-23 08:17:51 +05:30
Aleksandra Sikora
447aac3692
console: allow adding post-update checks in update permissions (close #4142) (#4313) 2020-04-22 17:55:10 +05:30
Rakesh Emmadi
e983b1596e
fix recreating action's permission, fix #4377 (#4495)
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
2020-04-22 11:29:14 +05:30
Rikin Kachhia
20c3beeea0
console: prevent trailing spaces while creating new role (close #3871) (#4497) 2020-04-21 21:36:21 +05:30
Auke Booij
b2ad3ee2ee
server: avoid integer overflows (fix #576) (fix #4368) (#4435)
* Update graphql-parser-hs and hence use `Scientific` directly

The new version of graphql-parser-hs returns Scientific and Integer
rather than Double and Int32, respectively.  So we now need to do less
work in graphql-engine, and we can process larger numbers.

In practice, this means that when inserting a bigint, we no longer
need to specify the inserted integer as text.  This is also
represented in the updated tests.

* Generate int overflow error on insert

* Document bigint insertion support in changelog
2020-04-21 15:56:15 +02:00
Rikin Kachhia
a9bca2383f
console miscellaneous fixes (#4433)
* format row count in data browser for readablity
* move pre-release notification tooltip msg to top
* remove extra localPresets key from migrations (close #3976)
* make nullable and unique labels for columns clickable in insert and modify
* fix row delete for relationships in data browser
2020-04-21 18:41:44 +05:30
Auke Booij
cd2e09c6ad
server: add support for timestamps without timezone to graphql-engine (fix #1217) (#4452)
* Add support for timestamps without timezone to graphql-engine

* Add tests for aggregations on timestamps without timezones
2020-04-21 14:30:48 +02:00
Aleksandra Sikora
386786f57c
console: fix columns reordering for relationship tables in data browser (#4483) 2020-04-21 16:46:24 +05:30
Marco Pegoraro
dc88d1727b
Add API docs for webhook_from_env (#4462)
* Add API docs for `webhook_from_env`

fixes #4419

* add changelog

* Fixes PR required change

* Improve create_trigger api doc

* Update docs/graphql/manual/api-reference/schema-metadata-api/event-triggers.rst

Co-Authored-By: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/manual/api-reference/schema-metadata-api/event-triggers.rst

Co-Authored-By: Marion Schleifer <marion@hasura.io>

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
Co-authored-by: Marion Schleifer <marion@hasura.io>
2020-04-21 14:04:39 +05:30
Toan Nguyen
5f84669568
server: support single $ as root json path (#4482)
* support single $ json path

* support sql query with root json path

* update changelog

* update changelog

Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-04-21 13:36:11 +05:30
Auke Booij
be28a3b95c
Move changelog entry to the right section (#4493) 2020-04-21 12:06:30 +05:30
Jigyasu Arya
e991180f43
console: change react ace editor theme to eclipse (close #4437) (#4443) 2020-04-20 18:12:45 +05:30
Toan Nguyen
15c0ebf1ef
allow special characters in json path's property name (close #3890) (#3892)
* allow underscore prefix and special characters in json path

* server: Rewrite/refactor JSONPath parser

The JSONPath parser is also rewritten, the previous implementation
was written in a very explicitly “recursive descent” style, but the whole
point of using attoparsec is to be able to backtrack! Taking advantage
of the combinators makes for a much simpler parser.

Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
Co-authored-by: Alexis King <lexi.lambda@gmail.com>
Co-authored-by: Aleksandra Sikora <ola.zxcvbnm@gmail.com>
Co-authored-by: Shahidh K Muhammed <shahidh@hasura.io>
2020-04-20 14:25:09 +05:30
ShahAnuj2610
bf719cbf34
console: surround string type column default value with quotes (close #4371) (#4423) 2020-04-17 21:32:13 +05:30
Auke Booij
b2d65d16d3
server: _inc for non-integer numeric types (fix #3573) (#4429)
* Allow `_inc` to update other numeric types in addition to integers

* Add support for PostgreSQL's `money` field type

* Add support for _inc on money types

* Add note of generalized `_inc` support to changelog
2020-04-17 11:32:09 +02:00
Aleksandra Sikora
550de3e8a0
console: add possible undefined check (#4445) 2020-04-17 11:58:47 +05:30
Tirumarai Selvan
c0a51d5d05
small fixes (#4430) 2020-04-16 16:39:01 +05:30
Karthikeyan Chinnakonda
5116e16e18
server(actions): add support for queries (close #4032) (#4309)
* add support for action queries

* a new parameter `type` is added in the ArgumentDefinition, its value
  can be either `query` or `mutation` and it defaults to the latter

* throw 400 when a query action is tried to explain

* update the actions docs to include query actions

* refactor the ToJSON and ToOrdJSON of ActionDefinition

Co-authored-by: Rishichandra Wawhal <rishi@hasura.io>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-04-16 12:55:19 +05:30
Karthikeyan Chinnakonda
a26bc80496
accept a new argument claims_namespace_path in JWT config (#4365)
* add new optional field `claims_namespace_path` in JWT config

* return value when empty array is found in executeJSONPath

* update the docs related to claims_namespace_path

* improve encodeJSONPath, add property tests for parseJSONPath

* throw error if both claims_namespace_path and claims_namespace are set

* refactor the Data.Parser.JsonPath to Data.Parser.JSONPathSpec

* update the JWT docs

Co-Authored-By: Marion Schleifer <marion@hasura.io>

Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: rakeshkky <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Tirumarai Selvan <tirumarai.selvan@gmail.com>
2020-04-16 12:15:21 +05:30
Aleksandra Sikora
72b2301bc0
console: persist page size in data browser (#4323) 2020-04-15 20:38:37 +05:30
Rakesh Emmadi
dc31b835e1
allow reusing Postgres scalars in custom types & actions (close #4125) (#4333)
* allow re-using Postgres scalars in custom types, close #4125

* add pytest tests

* update CHANGELOG.md

* add a doc pointer for reusable postgres scalars

* document the code, improve the CHANGELOG entry

As suggested by @lexi-lambda

* a bit more source code documentation, use WriterT to collect reused scalars

* Apply suggestions from code review

Co-Authored-By: Marion Schleifer <marion@hasura.io>

* improve doc for Postgres scalars in custom graphql types

* Add some more references to Note; fix Haddock syntax

Also a few very minor tweaks:
  * Use HashSet instead of [] more pervasively
  * Export execWriterT from Hasura.Prelude
  * Use pattern guards in multi-way if
  * Tweak a few names/comments

* Pull buildActions out of buildAndCollectInfo, use buildInfoMap

* Tweak wording in documentation

* incorporate changes in console code

* account Postgres scalars for action input arguments

-> Avoid unnecessary 'throw500' in making action schema

* Review changes

Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Alexis King <lexi.lambda@gmail.com>
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
Co-authored-by: Aleksandra Sikora <ola.zxcvbnm@gmail.com>
2020-04-15 17:33:13 +05:30
Aravind Shankar
21a4dff993
cli(squash): add set_table_is_enum metadata type (close #4394) (#4395) 2020-04-14 16:39:41 +05:30
Karthikeyan Chinnakonda
a23c633bd7
unlock inflight events when gracefully shutdown (close #3548) (#4214)
* unlock the locked-events during graceful shutdown

* Some events can still be delivered multiple times due to
  ungraceful shutdown

* modify the preparevents documentation

* modify the prepareEvents doc

* update changelog

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
2020-04-14 11:31:50 +05:30
ShahAnuj2610
cba85cd4a8
console: redirect to /:table/browse from /:table (close #4330) (#4374) 2020-04-13 19:52:32 +05:30
Rishichandra Wawhal
61d58906e7
console: recover from SDL parse in actions type definition editor (fix #4385) (#4389) 2020-04-13 18:22:07 +05:30