Commit Graph

153 Commits

Author SHA1 Message Date
Rakesh Emmadi
9fbd407374 parse graphql input objects and arrays as scalar values (close #1132) (#1137) 2018-12-04 19:51:58 +05:30
Rakesh Emmadi
29ba490296 conform to graphql subscription and error spec (close #1056, close #1059) (#1126) 2018-12-04 19:07:38 +05:30
Rakesh Emmadi
3ea20bc4d7 allow authentication webhook with POST (close #1138) (#1147) 2018-12-03 16:49:08 +05:30
Vamshi Surabhi
db1f6c1a39
remove dependency on 'first' aggregate, closes #1085 (#1089) 2018-11-27 21:40:54 +05:30
Rakesh Emmadi
1e896a9c42 handle null values for input arguments, fix #1113 (#1123) 2018-11-27 17:54:51 +05:30
Anon Ray
0d14c13f98 metadata should be backwards compatible for remote schemas (fix #1120) (#1121) 2018-11-27 16:56:10 +05:30
Anon Ray
a509a86eaa implement internal graphql server for remote schema tests (#1117)
* implement internal graphql server for remote schema tests

* add one more graphql endpoint and more tests

* add missing dependency
2018-11-26 18:38:16 +05:30
Rakesh Emmadi
8df23ad6c9 use postgres IN experssion for _in operator (fix #1109) (#1111) 2018-11-26 15:39:55 +05:30
Anon Ray
512ee6fb9f adds basic support for remote schemas/schema stitching (#952) 2018-11-23 18:32:46 +05:30
Shahidh K Muhammed
6fb24d5bf0 update server dockerfile, install manifests and docs (#1097) 2018-11-23 14:47:31 +05:30
Rakesh Emmadi
58fe579497 support Postgres's DISTINCT ON (close #1040) (#1099) 2018-11-23 07:23:56 +05:30
Dimitrios Mavrommatis
ef6e53a407 change descending ordering to nulls first (fix #1008) (#1009) 2018-11-22 10:28:18 +05:30
Rakesh Emmadi
030f094de9 handle empty array for _in and _nin operators, fix #1075 (#1076) 2018-11-21 12:28:29 +05:30
Vamshi Surabhi
47dcae1614
fix sql generation for boolean expressions, closes #853 (#1037)
When using self referential relationships in boolean expressions, the exists clause incorrectly uses the table names to qualify columns which will be the same for parent table and the child table. This is now fixed by generating unique aliases as we traverse down the relationships.
2018-11-16 18:10:23 +05:30
Rakesh Emmadi
1539d6b5a6 server port can be set with HASURA_GRAPHQL_SERVER_PORT env variable, closes #1033 (#1038) 2018-11-15 10:25:39 +05:30
Rakesh Emmadi
b719e82e89 add statistical aggregate operations and count on columns (close #1028) (#1029) 2018-11-14 18:29:59 +05:30
Tirumarai Selvan
317efb81f1 event triggers: take webhook url from env (close #966) (#968) 2018-11-14 12:43:01 +05:30
Rakesh Emmadi
9af591e2cb remove x-hasura-access-key header from logs (fix #1016) (#1017) 2018-11-13 14:05:44 +05:30
Tirumarai Selvan
d4d31838cb quote function and trigger names, allow hyphen in trigger name (#1012) 2018-11-13 11:28:55 +05:30
Rakesh Emmadi
8c1700e76f improve SQL generation for '_in' operation (close #1013) (#1014) 2018-11-12 18:57:47 +05:30
Rakesh Emmadi
80de0e019a do not generate prefix for column identifiers in agg select, fix #1004 (#1005) 2018-11-12 12:58:46 +05:30
Abhinav Srivastava
c776cd84a6 update multiple files (#943) 2018-11-08 12:02:57 +05:30
Anupam Dagar
e1253e595a add missing serve command to server contributing guide (#910) 2018-11-04 08:11:06 +05:30
Rakesh Emmadi
999580481c allow specifying a list of columns that can be inserted (close #250) (#917) 2018-11-02 20:38:38 +05:30
Rakesh Emmadi
0e9d6994ac refactor nested insert mutation and fix returning (fix #844) (#852)
* improved nested insert execution logic

* integrate error path, improve executing 'withExp' and improve tests

* add more readable types in '/Resolve/Insert.hs'

* set conflict context just before executing WITH expression
2018-11-02 19:31:01 +05:30
Shahidh K Muhammed
f7da89e10a
remove enable console from docker cmd and add it as env var (close #907) (#938) 2018-11-02 15:59:01 +05:30
Rakesh Emmadi
1a91399298 extract session variables from relational bool expression (fix #960) (#961) 2018-11-02 15:06:33 +05:30
Rakesh Emmadi
0803738df1 refactor select query generation (#941) 2018-10-31 18:21:20 +05:30
Tirumarai Selvan
c5c2ed2389 give precedence to retry-after header over retry conf (#954) 2018-10-31 17:22:41 +05:30
Tirumarai Selvan
b40807c9ec change type of fetch interval to milliseconds (#939) 2018-10-30 20:50:18 +05:30
Mohammed Rishad
58ccddc76e pep8 fixes for python files (#875) 2018-10-30 14:51:58 +05:30
nizar-m
4f091e5e5b gitignore generated .tix files in pytest folder (#924) 2018-10-29 19:55:37 +05:30
nizar-m
0ffb0478b9 Tests for server with access control, and some more tests (#710)
* 1) Tests for creating permissions
2) Test for constraint_on with GraphQL insert on_conflict

* Run tests with access key and webhook

* Tests for GraphQL query with quoted columns

* Rewrite test-server.sh so that it can be run locally

* JWT based tests

* Tests with various postgres types

* For tests on select queries, run setup only once per class

* Tests for v1 count queries

* Skip teardown for tests that does not modify data

* Workaround for hpc 'parse error when reading .tix file'

* Move GeoJson tests to the new structure

* Basic tests for v1 queries

* Tests for column, table or operator not found error cases on GraphQL queries

* Skip test teardown for mutation tests which does not change database state, even when it returns 200.
2018-10-28 23:57:49 +05:30
Vamshi Surabhi
58582be644
fix parsing webhook response, closes #890 (#894) 2018-10-28 22:01:24 +05:30
Tirumarai Selvan
baf7c493bc respect retry-after header on event trigger response (#525) 2018-10-26 21:58:03 +05:30
Vamshi Surabhi
8b0082eac1
clean up user variables parsing logic and fix explain api (#869) 2018-10-26 21:27:22 +05:30
Rakesh Emmadi
fb842fde6f optional 'set' field in insert permissions, closes #216 (#622) 2018-10-26 20:28:20 +05:30
Rakesh Emmadi
f6ed169219 allow ordering using columns from object relationships (closes #463) (#672)
* allow ordering using columns from object relationships, close #463

* validate table fields in nested insert

* add tests

* add docs

* change 'table_order_by' type from enums to ordered map

* remove unwanted code from 'Schema.hs' file

* 'AnnGObject' is not list of field name and value tuple

* update docs for new order_by type

* use 'InsOrdHashMap' for 'AnnGObj'

* handle empty fields in order_by

* remove '_' prefixes for asc/desc

* fix the changed order_by syntax across the repo
2018-10-26 17:27:33 +05:30
Rakesh Emmadi
a8cee16ab5 support aggregations (closes #786) (#787)
* support for count and aggregations on columns, close #786

* support explain query for aggregations

* '<arr-rel>_agg' in '<table>' type, fix order by for aggregations

* add 'allow_aggregations' key in select permissions

* Add checkbox to toggle count and aggregations on columns on select permission

* align aggregation checkbox with columns div

* improve readability of the generated sql

* alias is needed at the top level aggregation

* throw internal errors for unexpected fields

* rename SelFld to more readable TableAggFld

* rename agg to aggregate
2018-10-26 14:32:43 +05:30
Rakesh Emmadi
10d8529d28 allow unauthorized role in accesskey and JWT modes (closes #595) (#856) 2018-10-25 23:46:25 +05:30
Vamshi Surabhi
199531cbd9
http and websocket logs now correctly have user information, closes #849 (#850) 2018-10-25 15:07:57 +05:30
Tirumarai Selvan
810b440089 trigger webhooks on column level changes instead of row (close #547, close #680) (#550) 2018-10-25 12:52:51 +05:30
Vamshi Surabhi
ab9692da4d
set all session data in a single paramater, 'hasura.user' (closes #825) 2018-10-24 16:09:47 +05:30
nizar-m
cd030068c2 GeoJSON: Fix MultiPolygon parse error (closes #840) 2018-10-24 13:51:37 +05:30
Spencer Ng
a0a97d709d improve documentation (fix #745) (#746) 2018-10-19 22:29:18 +05:30
Vamshi Surabhi
ac537330d0 explain a graphql query, similar to explain of an sql statement (close #562) (#805) 2018-10-19 07:45:28 +05:30
Vamshi Surabhi
67168b3632 send 'completed' after an error when handling start in ws (close #671) (#776) 2018-10-16 17:19:24 +05:30
Rakesh Emmadi
45691e3509 for views consider only insertable ones in generating nested insert input objects (fix #773) (#774) 2018-10-16 15:55:41 +05:30
Rakesh Emmadi
49dd7bf98b allow mutations on views only if they are allowed by postgres (fix #232) (#339) 2018-10-12 17:36:12 +05:30
Rakesh Emmadi
37e848ccca fix input object validation logic (fix #693) (#711) 2018-10-12 16:06:47 +05:30