Alexis King
89af4ae4d7
Move arrow transformers into a separate module
2020-01-08 16:45:54 -06:00
Alexis King
e2eabcd54e
Properly check that custom field names do not conflict with other fields
2020-01-08 16:45:53 -06:00
Alexis King
27997107ab
Add caching for recreating event trigger functions
2020-01-08 16:45:46 -06:00
Alexis King
780857fb19
Switch to a CPS implementation of Rule
...
This is significantly more performance, even without specialization,
which dramatically improves compile times.
2020-01-08 16:45:46 -06:00
Alexis King
c322e8a5d4
Use a significantly more efficient table_info_agg view
...
Also, use the view in Schema.Diff to share some more logic.
2020-01-08 16:45:46 -06:00
Alexis King
447bac74e7
Split up Hasura.RQL.DDL.Schema.Cache
...
This should hopefully improve compile times by avoiding the need to
specialize everything at once.
2020-01-08 16:45:46 -06:00
Alexis King
5b969208c6
Use arrows instead of monads to define the schema cache construction
2020-01-08 16:43:06 -06:00
Alexis King
1387722970
Refactor schema cache construction to avoid imperative updates
...
wip: fix error codes in remote schema tests
2020-01-08 16:43:06 -06:00
Alexis King
f2963a25c3
Add Hasura.Incremental, a library for incremental builds
2020-01-08 16:43:06 -06:00
Toan Nguyen
2aba7edf81
add query execution time and response size to ws-server logs in websocket transport ( #3584 )
2020-01-07 14:25:32 -06:00
Phil Freeman
9e2c8b420b
Report errors in parallel when batching ( #3605 )
...
* Report errors in parallel when batching
* Add some more test cases
2019-12-30 17:18:20 -06:00
Rakesh Emmadi
181902cc6c
fix absence of "args" input field omits session variable argument, fix #3576 ( #3585 )
2019-12-26 16:32:48 -06:00
Brandon Simmons
1e161d2ed1
Initial benchmarks for caching. Closes #3530
...
These aren't suitable e.g. for running in CI since some take far too
long (and an impossibly long-time when running under criterion's normal
bootstrapping sampling regime.
We might try to improve this ourselves:
https://github.com/bos/criterion/issues/218
An initial summary analysis will be in #3530 .
2019-12-20 10:10:07 -06:00
Brandon Simmons
5ca654dc0d
Fix Hasura.Cache.Bounded.mkCacheSize to make sure we don't silently wrap or accept 0
2019-12-20 10:09:06 -06:00
Brandon Simmons
3f848a5c05
Fix unnecessary conditional logic in cache implementations
2019-12-20 10:09:06 -06:00
Phil Freeman
c766881125
Support batched queries ( fix #1812 ) ( #3490 )
2019-12-20 10:04:02 -06:00
nizar-m
c0038a74a5
Allow request body to be logged even with successful queries ( #3529 )
2019-12-16 15:02:05 -06:00
Rakesh Emmadi
421a182f64
export metadata without nulls, empty arrays & default values ( #3393 )
...
* export metadata without nulls, empty arrays
* property tests for 'ReplaceMetadata' using QuickCheck
-> Derive Arbitrary class for 'ReplaceMetadata' dependant types
* reduce property test cases number to 30
QuickCheck generates the `ReplaceMetadata` value really large
for higher number test cases. Encoded JSON for such values is large and
consumes more memory. Thus, CI is giving up while running property
tests.
* circle-ci: Add property tests as saperate job
* add no command mode to tests
* add yaml.v2 to go mod
* remove indirect comment for yaml.v2 dependency
2019-12-14 00:47:38 -06:00
Brandon Simmons
55bc9d57ef
Fix documentation of HASURA_GRAPHQL_PG_CONNECTIONS ( #3495 )
2019-12-12 14:10:04 -06:00
Anon Ray
b81d22f583
fix resolving user info in websocket transport ( #3509 )
...
The connection handler in websocket transport was not using the
'UserAuthentication' interface to resolve user info. Fix resolving
user info in websocket transport to use the common
'UserAuthentication' interface
2019-12-10 19:04:49 -06:00
Rakesh Emmadi
60acf7c081
fix json/jsonb columns as String values in nested returning of a mutation ( fix #3365 ) ( #3375 )
2019-12-10 17:20:55 -06:00
Rakesh Emmadi
9fe6070663
avoid CTE expressions in sql function queries, close #3349 ( #3504 )
...
Instead of
'WITH some_alias (SELECT * from some_func()) SELECT <rows> FROM some_alias'
for SQL function queries, Use
'SELECT <rows> FROM some_func() AS some_alias'
2019-12-09 20:27:44 -06:00
Rakesh Emmadi
3f8a1d9ebf
fix insert permission views are not unique for long role names ( fix #3444 ) ( #3486 )
...
* fix insert permission views are not unique for long role names, fix #3444
* Use GHC notes reference and improve comments
2019-12-09 17:23:06 -06:00
Tirumarai Selvan
ff4b2bf8b0
bulk query should not care about access mode of select or count queries ( #3467 )
2019-12-04 13:16:37 -06:00
Anon Ray
afd6f30e72
read cache control header to refresh JWK ( fix #3301 ) ( #3446 )
2019-12-03 14:56:59 -06:00
Rakesh Emmadi
cb682e2539
fix updating a column with multiple operators causing postgres query error ( fix #3432 ) ( #3458 )
2019-12-03 14:00:37 -06:00
Tirumarai Selvan
3cd656f3c7
check db connection in healthz endpoint ( close #2645 ) ( #3440 )
...
* check db connection in healthz endpoint
* use Spock.text to automatically set Content-Type
* update docs
2019-12-03 13:18:10 -06:00
Anon Ray
c9b9ed5055
fix various functions to not create their own logger ( #3439 )
2019-11-28 14:33:14 +05:30
Anon Ray
490b639981
refactor some internal components ( #3414 )
2019-11-26 17:44:21 +05:30
Vamshi Surabhi
6abe8d7927
allow specifying an upper limit on the query plan cache size ( #3012 )
2019-11-25 11:12:23 -06:00
Rakesh Emmadi
c4c5dd87ac
allow identical fields in custom column names configuration ( fix #3137 ) & improve root fields validation ( #3154 )
...
* 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 #2322 ) ( #3143 )
2019-11-20 12:17:06 +05:30
Tirumarai Selvan
d2b2a58c0e
add read_only to run_sql metadata api ( #3191 )
2019-11-14 18:20:18 -06:00
Tirumarai Selvan
ffeda35ff7
add few x-forwarded- headers ( close #2572 ) ( #3347 )
2019-11-13 14:25:11 -06:00
Tirumarai Selvan
3cad1319c4
improve event fetch query ( #3236 )
2019-11-13 12:59:19 +05:30
Rakesh Emmadi
3888ceb24a
computed fields in export/import metadata, other fixes ( #3211 )
2019-11-07 20:09:48 +05:30
Rakesh Emmadi
37dd0966d0
fix insert with nested returning clause fails alongside text[] column ( fix #3148 & #2520 ) ( #3198 )
2019-11-06 23:14:36 -06:00
Rakesh Emmadi
1b96ebc7d2
deterministic ordering of objects in exported metadata ( close #3125 ) ( #3230 )
...
* deterministic ordering of objects in exported metadata, close #3125
* refactor 'Hasura.RQL.DDL.Metadata'
2019-11-05 20:11:03 -06:00
Shahidh K Muhammed
31e0225230
add tests with postgres 12 ( close #2749 ) ( #3102 )
2019-10-26 11:09:57 +05:30
Rakesh Emmadi
6d92e4f9db
save permissions, relationships and collections in catalog with 'is_system_defined' explicitly ( #3165 )
...
* save permissions, relationships and collections in catalog with 'is_system_defined'
* Use common stanzas in the .cabal file
* Refactor migration code into lib instead of exe
* Add new server test suite that exercises migrations
* Make graphql-engine clean succeed even if the schema does not exist
2019-10-21 11:01:05 -05:00
Rakesh Emmadi
d8d21c1487
support computed fields returning scalars or set of tables ( close #1387 ) ( #2917 )
2019-10-18 13:59:47 +05:30
Alexis King
e01008413e
Track variable uses within query validation for caching ( fix #3097 ) ( #3135 )
...
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 #2801 .
2019-10-16 09:33:34 -05:00
Ajeet D'Souza
a66fb42ce2
Make catalog metadata migrations work on all schema versions ( fix #2826 ) ( #2379 )
...
* 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 #2820 and #3010 ) ( #3074 )
...
* Include enum types in schema whenever references are visible (fix #2820 )
* Fix RQL parsing for nullable enum table references (fix #3010 )
2019-10-10 21:22:16 -05:00
Rakesh Emmadi
f3b418c631
support where clause in on_conflict of insert mutation ( close #2795 ) ( #3002 )
2019-10-09 05:09:20 -05:00
Toan Nguyen
0c74839934
add raw query field for error http log ( close #2963 ) ( #3020 )
2019-10-07 13:04:33 -05:00
Rakesh Emmadi
8972dfb018
remove brotli compression ( #2967 )
...
Although brotli itself is MIT-licensed, the Haskell brotli library that provides bindings to it is GPL-licensed, so we cannot use it unless we get a response on haskell-hvr/brotli#1 .
2019-10-05 02:20:50 -05:00
Rakesh Emmadi
084439db7e
fix SQL generation if more than one aggregate order_by items present, fix #2981 ( #2998 )
2019-10-04 23:00:53 -05:00
Vamshi Surabhi
0f143f0ea8
fixes to the subscriptions improvements introduced with #2942 ( #3005 )
...
* 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 ( #2950 )
2019-10-03 15:18:49 +05:30