1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-28 10:00:46 +03:00
Commit Graph

299 Commits

Author SHA1 Message Date
Rakesh Emmadi
c4c5dd87ac allow identical fields in custom column names configuration (fix ) & improve root fields validation ()
* allow identical column fields in 'custom_column_names'
* improve validation of custom column names
* improve 'checkForFieldConflicts' & validate custom column names with non column fields
* split `validateTableConfig` into two isolated validation logic
* improve validation of root fields
* improve validating custom root fields and duplicate root fields
* move 'validateCustomRootFields' to 'buildSchemaCache'
2019-11-20 06:40:56 -06:00
Rakesh Emmadi
9b8e6b42d1 functions can access session info via input arg (close ) () 2019-11-20 12:17:06 +05:30
Tirumarai Selvan
d2b2a58c0e add read_only to run_sql metadata api () 2019-11-14 18:20:18 -06:00
Tirumarai Selvan
ffeda35ff7 add few x-forwarded- headers (close ) () 2019-11-13 14:25:11 -06:00
Rakesh Emmadi
3888ceb24a computed fields in export/import metadata, other fixes () 2019-11-07 20:09:48 +05:30
Rakesh Emmadi
37dd0966d0 fix insert with nested returning clause fails alongside text[] column (fix & ) () 2019-11-06 23:14:36 -06:00
Rakesh Emmadi
d8d21c1487 support computed fields returning scalars or set of tables (close ) () 2019-10-18 13:59:47 +05:30
Alexis King
e01008413e
Track variable uses within query validation for caching (fix ) ()
This fix is a little ugly, but it’s the only simple solution without a
significant refactoring that restructures the relationship between
GraphQL/Validate and GraphQL/Resolve. The ugliness should go away if we
implement something like .
2019-10-16 09:33:34 -05:00
Ajeet D'Souza
a66fb42ce2 Make catalog metadata migrations work on all schema versions (fix ) ()
* Separate DB and metadata migrations
* Refactor Migrate.hs to generate list of migrations at compile-time
* Replace ginger with shakespeare to improve performance
* Improve migration log messages
2019-10-11 00:13:57 -05:00
Alexis King
c0d7402e15
Fix two enum table reference bugs (fix and ) ()
* Include enum types in schema whenever references are visible (fix )
* Fix RQL parsing for nullable enum table references (fix )
2019-10-10 21:22:16 -05:00
Rakesh Emmadi
f3b418c631 support where clause in on_conflict of insert mutation (close ) () 2019-10-09 05:09:20 -05:00
Vamshi Surabhi
0f143f0ea8 fixes to the subscriptions improvements introduced with ()
* fix incorrect references to result variables
* remove docs/code related to 'fallback' backend
2019-10-03 14:35:55 -05:00
Tirumarai Selvan
5893cf47ed remove conflict_action type () 2019-10-03 15:18:49 +05:30
Alexis King
18e8fbab1b
Parameterize all SQL values when multiplexing subscription queries ()
Also, add support for explaining subscriptions while we’re at it.
2019-09-30 14:50:57 -05:00
Rakesh Emmadi
9bd5826020 allow customising graphql schema for a table (close ) ()
* allow customizing GraphQL root field names, close 

* document v2 track_table API in reference

* support customising column field names in GraphQL schema

* [docs] add custom column fields doc in API reference

* add tests

* rename 'ColField' to 'ColumnField'

* embed column's graphql field in 'PGColumnInfo'

-> Value constructor of 'PGCol' is not exposed
-> Using 'parseJSON' to construct 'PGCol' in 'FromJSON' instances

* avoid using 'Maybe TableConfig'

* refactors & 'custom_column_fields' -> 'custom_column_names'

* cli-test: add configuration field in metadata export test

* update expected keys in `FromJSON` instance of `TableMeta`

* use `buildSchemaCacheFor` to update configuration in v2 track_table

* remove 'GraphQLName' type and use 'isValidName' exposed from parser lib

* point graphql-parser-hs library git repo to hasura

* support 'set_table_custom_fields' query API & added docs and tests
2019-09-19 10:17:36 +05:30
Alexis King
54e6439579 Change the way we determine whether or not queries are reusable
This fixes an issue where queries could incorrectly be considered
reusable if a variable was used in two positions: one where it affected
SQL generation and one where it did not.
2019-09-16 22:00:46 -05:00
Alexis King
264d70644b Multiplex all subscriptions, grouping them by their resolved SQL query 2019-09-16 22:00:46 -05:00
Ajeet D'Souza
99174cca9b propagate Postgres table comments to GraphQL schema descriptions (close ) () 2019-09-16 20:51:11 -05:00
José Lorenzo Rodríguez
5609fba393 Implemented graceful shutdown for websockets () 2019-09-09 15:26:04 -05:00
Victor Ferreira
27d85ca6bb fix a typo in limit description of schema (close ) () 2019-09-05 12:47:01 +05:30
Rakesh Emmadi
f7c99689da support intersect filters on raster columns (close ) ()
* initial raster support

* _st_intersects_geom -> _st_intersects_geom_nband

* add tests

* update docs

* improve docs

As requested by @marionschleifer

* new type for raster values

Suggested by @lexi-lambda

* replace `SEUnsafe "NULL"` with SENull
2019-08-29 18:37:05 +05:30
Rakesh Emmadi
d9fb0f8780 use named notation for function arguments if any argument is not specified (fix ) ()
* use positional arguments in SQL functions
* only allow omitting set of last arguments in functions
* disallow omitting of a non default argument in functions
2019-08-28 14:27:15 -05:00
Alexis King
00862fcad8 Centralize handling of expected PostgreSQL errors 2019-08-26 00:54:56 -05:00
Alexis King
7fa1452ca0 server: Rename a whole bunch of things
* PGTypeSimple → PGTypeScalar
* PGScalarTyped → WithScalarType
* PGColValue → PGScalarValue
* PGColInfo → PGColumnInfo
* PGRawColInfo → PGRawColumnInfo
* mkScalarSessionVar → mkTypedSessionVar
2019-08-26 00:54:56 -05:00
Alexis King
ed26da59a6 Add support for GraphQL enum types via enum table references
These changes also add a new type, PGColumnType, between PGColInfo and
PGScalarType, and they process PGRawColumnType values into PGColumnType
values during schema cache generation.
2019-08-26 00:54:56 -05:00
Alexis King
86663f9af7 Rename PGColType to PGScalarType 2019-08-26 00:54:56 -05:00
Alexis King
d1179f7f98 Don’t use Show for converting PGColTypes to SQL 2019-08-26 00:54:56 -05:00
Alexis King
9be6f706e6 Refactor GCtx to split query and mutation root operations
This mostly simplifies the RootFlds type to make it clearer what it’s
used for, but it has the convenient side-effect of preventing some
“impossible” cases using the type system.
2019-08-26 00:54:56 -05:00
Tirumarai Selvan
98784212e2 allow configuring timeout for remote schema calls (close ) () 2019-08-23 14:27:19 +05:30
Rakesh Emmadi
8ac78fdaec accept null values in order_by input field (fix ) () 2019-08-22 03:14:27 -05:00
Tirumarai Selvan
7009e77c98 get all Set-Cookie headers (fix ) () 2019-08-19 22:24:13 -05:00
Tirumarai Selvan
46f2ecaa65 don't send the request to the client on HTTP throw () 2019-08-19 21:18:04 -05:00
Vamshi Surabhi
52bf885f14
refactor schema.hs into multiple modules ()
Mostly moving around things across modules. No change in
functionality.
2019-08-09 14:49:17 +05:30
Anon Ray
b4a0a03631 log when request body parsing fails (fix ) () 2019-08-01 16:21:59 +05:30
Alexis King
8f9a41ff88 Support casting between PostGIS geometry and geography types in where expressions (close ) ()
* server: Bump dependencies to allow Haddock to run successfully

* Support casting between PostGIS geometry and geography types in filters
2019-07-15 14:22:45 +05:30
Ajeet D'Souza
92c4cff79e check input for empty strings for metadata api (close ) () 2019-07-11 09:00:45 +00:00
Anon Ray
8f1e7dbc8d breaking: server logging changes (close , close ) () 2019-07-11 05:37:06 +00:00
Vamshi Surabhi
f1cf6d0b17
allow session variables in operators which expect array input () 2019-07-10 15:49:58 +05:30
Rakesh Emmadi
9eb38e6c96 cache remote schema's introspection query response (fix ) () 2019-07-08 11:21:41 +05:30
Rakesh Emmadi
c3c01beccc support null and default values for function arguments (close , close ) () 2019-06-04 18:13:28 +05:30
Anon Ray
278f26b073 forward set-cookie headers from remote servers (fix ) () 2019-06-04 15:40:28 +05:30
Anon Ray
95a27fba89 fix response for remote schema queries over ws (fix ) () 2019-05-29 17:21:09 +05:30
Anon Ray
81bdfafd69 ignore content-type header in auth webhook () 2019-05-16 14:41:15 +05:30
Rakesh Emmadi
0b210cc245 support allow-list for graphql queries (closes ) () 2019-05-16 11:43:25 +05:30
Rakesh Emmadi
c6f40df6d5 close websocket connection on JWT expiry (fix ) () 2019-05-14 11:54:46 +05:30
Anon Ray
ee783e142e fix sending duplicate content-type header to remote schemas (fix ) () 2019-05-13 18:17:01 +05:30
Anon Ray
a21f6cd648 introduce v1/graphql (fix ) ()
Changes compared to `/v1alpha1/graphql`

* Changed all graphql responses in **/v1/graphql** endpoint to be 200. All graphql clients expect responses to be HTTP 200. Non-200 responses are considered transport layer errors. 

* Errors in http and websocket layer are now consistent and have similar structure.
2019-05-10 11:35:10 +05:30
Anon Ray
dfaf7d3a1f fix duplicate headers being sent to remote schema () 2019-05-06 16:57:34 +05:30
Vamshi Surabhi
8389a7e273
multiplexed subscription improvements ()
* split stm transactions when snapshotting to make it faster

* mx subs: push to both old and new sinks at the same time

* expose dev APIs through allowed APIs flag
2019-04-30 10:45:23 +05:30
Vamshi Surabhi
7151f1387f
fix validation of null values, closes () 2019-04-24 13:19:39 +05:30
Vamshi Surabhi
83c3094936
add variable name to the path when there is an error, closes () 2019-04-24 12:02:53 +05:30
Vamshi Surabhi
24c0643a6d
Use ByteString to cache introspection response, closes ()
If we store it as EncJSON, we still need to render it to ByteString
for every request which will result in higher CPU usage
2019-04-18 17:45:07 +05:30
Vamshi Surabhi
35542df93f
candidate id shouldn't be part of the plan in multiplexed subscriptions () 2019-04-18 16:50:27 +05:30
Rakesh Emmadi
1d7cbc7f24 recover from inconsistent database state (closes ) () 2019-04-17 21:59:39 +05:30
Vamshi Surabhi
ce243f5899
multiplexed subscriptions ()
* add types to represent unparsed http gql requests

This will help when we add caching of frequently used ASTs

* query plan caching

* move livequery to execute

* add multiplexed module

* session variable can be customised depending on the context

Previously the value was always "current_setting('hasura.user')"

* get rid of typemap requirement in reusable plan

* subscriptions are multiplexed when possible

* use lazytx for introspection to avoid acquiring a pg connection

* refactor to make execute a completely decoupled module

* don't issue a transaction for a query

* don't use current setting for explained sql

* move postgres related types to a different module

* validate variableValues on postgres before multiplexing subs

* don't user current_setting for queries over ws

* plan_cache is only visible when developer flag is enabled

* introduce 'batch size' when multiplexing subscriptions

* bump stackage to 13.16

* fix schema_stitching test case error code

* store hashes instead of actual responses for subscriptions

* internal api to dump subscriptions state

* remove PlanCache from SchemaCacheRef

* allow live query options to be configured on server startup

* capture metrics for multiplexed subscriptions

* more metrics captured for multiplexed subs

* switch to tvar based hashmap for faster snapshotting

* livequery modules do not expose internal details

* fix typo in live query env vars

* switch to hasura's pg-client-hs
2019-04-17 15:18:41 +05:30
Rakesh Emmadi
bfe53e9d9a fix incorrect default values for inserts after column drop, fix () 2019-04-15 12:34:30 +05:30
Tirumarai Selvan
d53c70cbcd specify better error msgs for remote schema conflicts (fix ) () 2019-04-03 06:48:19 +05:30
Vamshi Surabhi
ada35c2236 add user information to transactions in ws protocol (fix ) ()
This bug introduced with the refactor in 739ff80a51.
2019-03-26 16:38:27 +05:30
Vamshi Surabhi
739ff80a51 refactor graphql query execution logic () 2019-03-25 23:55:25 +05:30
Toan Nguyen
560c31f9fd add a json path argument to query values inside json columns (close ) () 2019-03-25 19:15:35 +05:30
Shahidh K Muhammed
b8700cce70
add spatial predicates for geography columns (close ) ()
This PR adds support for PostGIS spatial predicates on geography columns. The predicates are _st_d_within and _st_intersects.
2019-03-25 17:59:52 +05:30
Rakesh Emmadi
5bafdce9a3 fix delete mutation returning incorrect data (fix ) (fix ) ()
From `alpha-40` we've been using a `WHERE` clause to fetch required rows and generate mutation response. This has a few limitations like the requirement of a primary key/unique constraint. This also returns inconsistent data on `delete` mutation as mentioned in . 
Now, we're using `VALUES (..)` (refer [here](https://www.postgresql.org/docs/current/sql-values.html)) expression to form virtual table rows in `SQL` to generate mutation response.

Internal changes:-
- Not to use primary key/unique constraint columns:-
  - Revert back to `ConstraintName` from `TableConstraint` in `TableInfo` type
  - Remove `tcCols` field in `TableConstraint` type
  - Modify `table_info.sql` and `fetchTableMeta` function `SQL`
- A test case to perform `delete` mutation and returning relational objects.
2019-03-22 12:38:42 +05:30
Vamshi Surabhi
ac1749c764 add type, variable information to input value's ast (close ) () 2019-03-20 12:01:49 +05:30
Vamshi Surabhi
24dcefb142
use bytestring builder to represent encoded json () 2019-03-18 21:52:21 +05:30
Anon Ray
961f1af528 send error not connection_error on query validation errors (fix ) () 2019-03-17 17:30:54 +05:30
Vamshi Surabhi
c7346fd55a bump stackage to lts 13 and refer to hasura's pg-client-hs () 2019-03-14 20:25:33 +05:30
Rakesh Emmadi
5f274b5527 fix mutation returning when relationships are present (fix ) ()
If returning field contains nested selections then mutation is performed in two steps
1. Mutation is performed with returning columns of any primary key and unique constraints
2. returning fields are queried on rows returned by selecting from table by filtering with column values returned in Step 1.

Since mutation takes two courses based on selecting relations in returning field, it is hard to maintain sequence of prepared arguments (PrepArg) generated while resolving returning field. So, we're using txtConverter instead of prepare to resolve mutation fields.
2019-03-07 15:54:07 +05:30
Anon Ray
d9882fcb03 fix remote queries/mutations to work over websocket (fix ) () 2019-03-05 16:39:02 +05:30
Anon Ray
02d80c9ac6 read cookie while initialising websocket connection (fix ) ()
* read cookie while initialising websocket connection (fix )

* add tests for cookie on websocket init

* fix logic for tests

* enforce cors, and flag to force read cookie when cors disabled

  - as browsers don't enforce SOP on websockets, we enforce CORS policy
  on websocket handshake
  - if CORS is disabled, by default cookie is not read (because XSS
  risk!). Add special flag to force override this behaviour

* add log and forward origin header to webhook

  - add log notice when cors is disabled, and cookie is not read on
  websocket handshake
  - forward origin header to webhook in POST mode. So that when CORS is
  disabled, webhook can also enforce CORS independently.

* add docs, and forward all client headers to webhook
2019-03-04 13:16:53 +05:30
Rakesh Emmadi
377290a058 breaking: correct (de)serialisation of postgres numeric types in json (fix ) () 2019-03-01 17:15:04 +05:30
Shahidh K Muhammed
097bfb6bfa revert "forward response headers from remote servers ()"
This reverts commit c19fe35f4e.
2019-02-28 17:20:56 +05:30
Anon Ray
c19fe35f4e forward response headers from remote servers (fix ) () 2019-02-28 17:15:07 +05:30
Rakesh Emmadi
c731fde1e3 enforce column presets of update permission with upserts (fix ) () 2019-02-23 16:06:42 +05:30
Tirumarai Selvan
7851015cb2 refactor event processing logic () 2019-02-22 17:55:36 +05:30
Rakesh Emmadi
0833d35088 generate scalar types for SQL function arguments (fix ) ()
Also involved a refactor of the internals to localise the context needed for each field
2019-02-22 15:57:38 +05:30
Rakesh Emmadi
cba732d439 support column presets in update mutation (closes , closes ) ()
Also restricts altering type of columns which are used in presets
2019-02-11 18:15:30 +05:30
Rakesh Emmadi
3caff9b924 support jsonb and postgis operators in permissions ()
* support jsonb and geometry operators on RQL bool exps, close 

* add tests for jsonb operators in /v1/query

TODO:-
-> add tests for geometry (postgis) operators

* support parsing session variables for st_d_within and has_key ops

-> Add tests for boolExp operators and select permissions

* improve parsing $st_d_within op's json value logic
2019-01-28 23:16:31 +05:30
nizar-m
32387ba964 support union and interface types in remote schema (close ) () 2019-01-28 22:15:10 +05:30
Anon Ray
39bc3acffd fix conversion when merging remote schema scalars with hasura (fix ) () 2019-01-28 21:01:37 +05:30
nizar-m
8e3b8f51c9 Support default values (in inputvalue) from the remote schema (close ) () 2019-01-28 18:08:38 +05:30
Rakesh Emmadi
fc73d4d30a handle the absence of any update operators, fix () 2019-01-28 12:54:24 +05:30
Rakesh Emmadi
0bf2457e23 allow exposing postgres functions through GraphQL interface (close ) () 2019-01-25 09:01:54 +05:30
Rakesh Emmadi
ae63ed9603 simplify SQL generated for _eq and _neq operators in GraphQL API () 2019-01-25 00:04:44 +05:30
Rakesh Emmadi
7ff1c8829a add PostGIS operators in boolean expressions (closes ) () 2019-01-17 11:51:38 +05:30
Rakesh Emmadi
1008c08420 accept null and empty values for relationships during insert, closes 2019-01-11 12:52:58 +05:30
Vamshi Surabhi
380fdad468 update constraint enum types when a new constraint is added ()
* update metadata when constraints on a table are altered, fix 

* capture only unique or primary constraints in tableinfo
2019-01-03 09:28:12 +05:30
Rakesh Emmadi
63acd0e7b2 generate aggregate order by types only if relevant columns are present, closes () 2018-12-20 19:31:54 +05:30
Rakesh Emmadi
3026c49087 apply update permissions for upsert mutations () 2018-12-15 21:40:29 +05:30
Vamshi Surabhi
ec8b2c80b5
refactor to remove warnings especially with orphan instances ()
* remove phase one/two distinction and hdbquery typeclass

* move extensions to default-extensions

* switch to LazyTx which only acquires a connection if needed

* move defns from TH module into Ops module

* remove tojson orphan instance for http exception

* remove orphan instance for dmlp1

* getTopLevelNodes will not throw any exceptions
2018-12-13 12:56:15 +05:30
Rakesh Emmadi
ff6c95c2f8 allow ordering with aggregated fields (close ) () 2018-12-12 18:28:39 +05:30
Anon Ray
77cbf12bb7 merge types with same structure in remote schema (closes , ) () 2018-12-12 17:31:18 +05:30
Rakesh Emmadi
9fbd407374 parse graphql input objects and arrays as scalar values (close ) () 2018-12-04 19:51:58 +05:30
Rakesh Emmadi
29ba490296 conform to graphql subscription and error spec (close , close ) () 2018-12-04 19:07:38 +05:30
Rakesh Emmadi
1e896a9c42 handle null values for input arguments, fix () 2018-11-27 17:54:51 +05:30
Anon Ray
0d14c13f98 metadata should be backwards compatible for remote schemas (fix ) () 2018-11-27 16:56:10 +05:30
Anon Ray
512ee6fb9f adds basic support for remote schemas/schema stitching () 2018-11-23 18:32:46 +05:30
Rakesh Emmadi
58fe579497 support Postgres's DISTINCT ON (close ) () 2018-11-23 07:23:56 +05:30
Dimitrios Mavrommatis
ef6e53a407 change descending ordering to nulls first (fix ) () 2018-11-22 10:28:18 +05:30
Vamshi Surabhi
47dcae1614
fix sql generation for boolean expressions, closes ()
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
b719e82e89 add statistical aggregate operations and count on columns (close ) () 2018-11-14 18:29:59 +05:30
Tirumarai Selvan
d4d31838cb quote function and trigger names, allow hyphen in trigger name () 2018-11-13 11:28:55 +05:30
Rakesh Emmadi
8c1700e76f improve SQL generation for '_in' operation (close ) () 2018-11-12 18:57:47 +05:30
Rakesh Emmadi
999580481c allow specifying a list of columns that can be inserted (close ) () 2018-11-02 20:38:38 +05:30
Rakesh Emmadi
0e9d6994ac refactor nested insert mutation and fix returning (fix ) ()
* 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
Rakesh Emmadi
0803738df1 refactor select query generation () 2018-10-31 18:21:20 +05:30
Vamshi Surabhi
8b0082eac1
clean up user variables parsing logic and fix explain api () 2018-10-26 21:27:22 +05:30
Rakesh Emmadi
fb842fde6f optional 'set' field in insert permissions, closes () 2018-10-26 20:28:20 +05:30
Rakesh Emmadi
f6ed169219 allow ordering using columns from object relationships (closes ) ()
* allow ordering using columns from object relationships, close 

* 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 ) ()
* support for count and aggregations on columns, close 

* 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
Vamshi Surabhi
199531cbd9
http and websocket logs now correctly have user information, closes () 2018-10-25 15:07:57 +05:30
Vamshi Surabhi
ac537330d0 explain a graphql query, similar to explain of an sql statement (close ) () 2018-10-19 07:45:28 +05:30
Vamshi Surabhi
67168b3632 send 'completed' after an error when handling start in ws (close ) () 2018-10-16 17:19:24 +05:30
Rakesh Emmadi
45691e3509 for views consider only insertable ones in generating nested insert input objects (fix ) () 2018-10-16 15:55:41 +05:30
Rakesh Emmadi
49dd7bf98b allow mutations on views only if they are allowed by postgres (fix ) () 2018-10-12 17:36:12 +05:30
Rakesh Emmadi
37e848ccca fix input object validation logic (fix ) () 2018-10-12 16:06:47 +05:30
Vamshi Surabhi
603461ad8f track connection_init error on each ws connection (close ) () 2018-10-09 15:51:05 +05:30
Rakesh Emmadi
00d5a5c1a3 insert mutations can now handle nested-data/relationsips (close ) () 2018-10-05 20:43:51 +05:30
Vamshi Surabhi
32ae105279 improved sql generation for select queries (closes , , ) ()
Better SQL generation for select queries (the query plans will be the same but much more readable). This closes some long standing issues (, , ).
2018-10-05 14:26:47 +05:30
Vamshi Surabhi
67ee3fc0f2 on a conn_init error send connection_err message instead of closing the ws conn (fix ) () 2018-09-29 13:21:49 +05:30
Anon Ray
75090d51b9 jwt config now takes a jwk url (close ) ()
JWT config now takes an optional jwk_url parameter (which points to published JWK Set). This is useful for providers who rotate their JWK Set.

Optional jwk_url parameter is taken. The published JWK set under that URL should be in standard JWK format (tools.ietf.org/html/rfc7517#section-4.8).

If the response contains an Expires header, the JWK set is automatically refreshed.
2018-09-27 16:52:49 +05:30
nizar-m
cde559fe58 dont set non-null constraint for manual object relationships (close ) 2018-09-18 17:01:16 +05:30
Vamshi Surabhi
85df9ac1e8 payload is now optional in connection_init message (close ) () 2018-09-18 13:13:30 +05:30
Vamshi Surabhi
dd8e09d6cb add jsonb boolean operators (close ) () 2018-09-07 17:45:28 +05:30
Tirumarai Selvan
82e09efce6 add event triggers () 2018-09-05 16:56:46 +05:30
Rakesh Emmadi
0a3f68a6eb allow selectively updating columns on a conflict during insert (fix )
* fix primary key changing on upsert, fix 

* add 'update_columns' in 'on_conflict' object, consider 'allowUpsert'

* 'ConflictCtx' type should respect upsert cases

* validation for not null fields in an object
2018-09-04 19:09:48 +05:30
Rakesh Emmadi
10edb431e4 generate a returning field in a mutation only when the select permission is defined (fix ) () 2018-09-03 12:35:00 +05:30
Rakesh Emmadi
daf01c2b9d mutation return type and query type are same (close ) () 2018-08-30 15:19:21 +05:30
Rakesh Emmadi
f72d8de87a fix insert fails for non-admin roles on v1/query (fix ) ()
* fix insert fails for non-admin roles on v1/query, fix 

* add test case for user role upsert usint constraint name
2018-08-29 19:11:33 +05:30
Rakesh Emmadi
efc9fc7ba9 simpler root level select fields using primary keys (fix ) ()
* select fields by primary key col values as argument values, fix 

* change field name 'table_by_pkey' to 'table_by_pk'
2018-08-27 19:47:03 +05:30
Rakesh Emmadi
a0574307c3 set header variables in subscription transaction, fix () 2018-08-22 13:53:53 +05:30
Rakesh Emmadi
e3b56ac368 fix upsert queries to work on non admin roles (fix ) () 2018-08-17 20:14:43 +05:30
Rakesh Emmadi
0797407dbf respect the nullability of columns in generated schema (fix ) () 2018-08-10 18:14:44 +05:30
Vamshi Surabhi
c901767cd1
update packages ()
* move to stackage 12.4

* upgrade pg-client

* docker build improvements
2018-08-08 13:10:13 +05:30
Rakesh Emmadi
8ecb80d2da accept null values for input values, closes () 2018-08-07 16:13:42 +05:30
Rakesh Emmadi
9c55490e98 add limit in select permission which overrides limit in query (close ) () 2018-08-06 17:45:08 +05:30
Rakesh Emmadi
8ef2692eb7 improve logs on webhook errors (closes , ) ()
* logging for webhook IO exceptions, fix log request for errors, fix 

* log status code and response in case of any error for webhook
2018-08-03 14:13:35 +05:30
Rakesh Emmadi
a0590598e5 filter schema identifiers to conform to graphql naming scheme (close ) ()
* filter schema identifiers to conform to graphql naming scheme,closes 

Filter out tables, columns, relationships etc which does not conform to
graphql naming scheme.
This ensures GraphiQL initialisation works properly for existing
databases.

* rename `isGraphQLConform` to `isValidName`

* rename all graphQL validators
2018-07-27 15:20:12 +05:30
Rakesh Emmadi
27e2d647bb add _inc and jsonb operators to update_mutation (close ) () 2018-07-20 16:21:20 +05:30
Vamshi Surabhi
e3f960da96 initial support for livequeries ()
fix 
2018-07-20 12:52:46 +05:30
Rakesh Emmadi
5efa366b49 add 'on_conflict' argument to insert mutation (closes )
* add 'on_conflict' condition to allow upsert mutation, closes 

* check for empty unique or primary key constraints

* add 'on_conflict' condition test cases and introspection test case

* update 'conflict_action' enum values' description
2018-07-17 18:53:23 +05:30
rakeshkky
a094394f38 server: add _is_null operator, closes 2018-07-12 19:33:02 +05:30
Vamshi Surabhi
9a845b4932 server: mutationRoot is optional in __schema 2018-06-29 17:32:59 +05:30
Vamshi Surabhi
db1a098b3b server: do not publish schema for system defined tables 2018-06-29 16:30:54 +05:30
Vamshi Surabhi
114418c378 server: support @skip and @include directives. closes 2018-06-29 14:50:49 +05:30
Vamshi Surabhi
f6bb130240 server: improved error messages. closes 2018-06-29 12:51:04 +05:30
Vamshi Surabhi
c09725ba79 server: coerce 'a' to '[a]' for list input types 2018-06-29 10:17:53 +05:30
Vamshi Surabhi
7e0bb03f17 server: map pgvarchar to GraphQL String 2018-06-29 10:17:53 +05:30
Vamshi Surabhi
47c73f750f server: use insert-ordered-containers for ordered map 2018-06-28 13:49:52 +05:30
Vamshi Surabhi
530027cf20 move raven into graphql-engine repo 2018-06-28 00:32:00 +05:30