Commit Graph

4812 Commits

Author SHA1 Message Date
Rikin Kachhia
f736ad2b47
fix console raw SQL track this logic (close #1671, #1627) (#1717)
* Track this will be disabled if SQL contains a create function statement
* Track this will be disabled if SQL contains a create table/view statement for a table/view which is already tracked
2019-03-13 15:35:49 +05:30
Rikin Kachhia
6c2f64b68a
update docs (#1748)
* increase roles TOC depth
* update enum docs page
* open external links in docs in new tabs
* update nested object sort docs
2019-03-13 15:34:40 +05:30
Rikin Kachhia
c753426934
add image zoom in docs (close #1483) (#1752) 2019-03-13 15:33:45 +05:30
Praveen Durairaj
36cb6f8b13 remove localStorage usage with auth0 (#1690)
Auth0 best practices recommend to not store tokens in localStorage. [Reference](https://auth0.com/docs/security/store-tokens#don-t-store-tokens-in-local-storage)

Updated code to make use of [checkSession](https://auth0.com/docs/libraries/auth0js/v9#using-checksession-to-acquire-new-tokens) which makes use of cookies.
2019-03-13 12:34:36 +05:30
Shahidh K Muhammed
50b02e950b update manifests to v1.0.0-alpha40 2019-03-12 12:05:46 +05:30
Rakesh Emmadi
e32f5a1fb1 sync metadata cache across multiple instances connected to same db (closes #1182) (#1574)
1. Haskel library `pg-client-hs` has been updated to expose a function that helps listen to `postgres` notifications over a `channel` in this [PR](https://github.com/hasura/pg-client-hs/pull/5)
2. The server records an event in a table `hdb_catalog.hdb_cache_update_event` whenever any `/v1/query` (that changes metadata) is requested. A trigger notifies a `cache update` event via `hasura_cache_update` channel
3. The server runs two concurrent threads namely `listener` and `processor`. The `listener` thread listens to events on `hasura_cache_update` channel and pushed into a `Queue`. The `processor` thread fetches events from that `Queue` and processes it. Thus server rebuilds schema cache from database and updates.
2019-03-12 11:16:27 +05:30
Shahidh K Muhammed
a5b4c5ffd6
change console code-owner to rikinsk 2019-03-08 11:24:09 +05:30
Shahidh K Muhammed
a83adf6503 skip ciignore check for release branches 2019-03-07 21:47:27 +05:30
surendran82
6a4a33f304 add quickstart content to console remote schema and event triggers pages (#1630) 2019-03-07 18:34:43 +05:30
Shahidh K Muhammed
a1089c1ec5
support ciignore for master builds too (#1708) 2019-03-07 17:48:06 +05:30
Rakesh Emmadi
5f274b5527 fix mutation returning when relationships are present (fix #1576) (#1703)
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
Shahidh K Muhammed
efc97c0b5c update digitalocean guide to include marketplace (#1706) 2019-03-07 12:40:16 +05:30
Shahidh K Muhammed
17183caed4
adds a check to see if the jobs should be run or not (close #1161) (#1705)
CircleCI jobs are run for any PR that is submitted to the repo. This PR adds a check to decide whether the job should be run or not.

Figured out that CircleCI has a way to gracefully terminate a job:
```
circleci-agent step halt
```

A `.ciignore` file is ran against all the changes in the PR to decide whether the PR should be built or not. If the answer comes out as `no`, a file is written at `/buid/skip_job.txt`. This is done in the `check_build_worthiness` step.

All further jobs, in the beginning, looks for this file and gracefully terminates the job if this file is present. The directory is passed down to the jobs as the workspace.

```yaml
  skip_job_on_ciignore: &skip_job_on_ciignore
    run: |
      if [ -f /build/skip_job.txt ]; then
        echo "halting job due to /build/skip_job.txt"
        circleci-agent step halt
      fi
```

ref: https://support.circleci.com/hc/en-us/articles/360015562253-Conditionally-end-a-running-job-gracefully

There are some known issues on jobs that are run when PR is merged to master, need to address them after this PR is merged.
2019-03-07 11:28:03 +05:30
Rikin Kachhia
06afb75f4e
console code refactor (#1688)
* Removed duplicate css
* Reorganised common code
2019-03-06 17:00:25 +05:30
Rikin Kachhia
c35753932f
update docs (#1696) 2019-03-06 14:28:04 +05:30
dsandip
f7fe393bac add do and azure one-clicks to readme (#1692) 2019-03-06 10:45:45 +05:30
Tirumarai Selvan
d6a3cf337f add hello-world remote-schema boilerplates for major serverless providers (#1694)
A hello world schema is provided with local dev and deployment instructions for AWS Lambda, Google Cloud Functions and Azure Functions.

Older boilerplates are cleaned up.
2019-03-05 21:45:39 +05:30
Vamshi Surabhi
98405fdc0c
allow x-hasura- req headers for jwt unauth role, closes #1686 (#1689) 2019-03-05 17:54:47 +05:30
Anon Ray
d9882fcb03 fix remote queries/mutations to work over websocket (fix #1619) (#1621) 2019-03-05 16:39:02 +05:30
Rikin Kachhia
da4ed1a808
fix console browse rows bugs (#1691) 2019-03-04 20:32:28 +05:30
Shahidh K Muhammed
6ecc187e4c update manifests to v1.0.0-alpha39 2019-03-04 13:21:19 +05:30
Anon Ray
02d80c9ac6 read cookie while initialising websocket connection (fix #1660) (#1668)
* read cookie while initialising websocket connection (fix #1660)

* 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
Vamshi Surabhi
f794653b69
update event triggers on rename operations (#1684) 2019-03-01 19:29:24 +05:30
Rakesh Emmadi
377290a058 breaking: correct (de)serialisation of postgres numeric types in json (fix #1523) (#1662) 2019-03-01 17:15:04 +05:30
comerc
e3e1200bae fix a typo in todo-auth0-jwt sample app (#1334) 2019-03-01 16:07:12 +05:30
Selvaganesh
95587bc028 added nodejs8 aws lambda boilerplate (#790) 2019-03-01 15:38:51 +05:30
Praveen Durairaj
039f16b906 update instructions for directory change (#1539) 2019-03-01 15:24:26 +05:30
Rakesh Emmadi
6c20ca8a55 allow renaming tables, columns and relationships (close #79) (#1542) 2019-03-01 14:47:22 +05:30
Rishichandra Wawhal
00227728cb add "*" for insert and delete columns when creating and modifying trigger (close #1629) (#1673)
This PR adds "*" as columns for insert and delete so that there are no column dependencies on event triggers and users can drop/modify columns whenever they want.

```
{
	"type": "bulk",
	"args": [{
		"type": "create_event_trigger",
		"args": {
			"name": "test",
			"table": {
				"name": "user",
				"schema": "public"
			},
			"webhook": "http://httpbin.org/post",
			"insert": {
				"columns": "*"
			},
                        "update": {
                               "columns": ["col1", "col2"] 
                       },
                       "delete": {
                               "columns": "*"
                       }
			"headers": []
		}
	}]
}
```
2019-03-01 11:13:10 +05:30
Rikin Kachhia
214cdeb388
update console permissions (#1658)
* removed trash icon to remove all permissions to avoid confusion. Same action can be done via the bulk section
* colour coded permissions symbols for better visual feedback
2019-02-28 20:22:08 +05:30
Rikin Kachhia
2783561e1b
update console browse rows section (close #1622) (#1642)
* Update browse rows UI
* Make columns draggable
* Make columns collapsible
* Allow multiple columns sort using column headers
* Add no sort option while toggling
2019-02-28 20:19:53 +05:30
nizar-m
1fa66dc622 add option to disable metadata and graphql apis (close #1088) (#1650) 2019-02-28 19:23:03 +05:30
Shahidh K Muhammed
097bfb6bfa revert "forward response headers from remote servers (#1664)"
This reverts commit c19fe35f4e.
2019-02-28 17:20:56 +05:30
Anon Ray
c19fe35f4e forward response headers from remote servers (fix #1654) (#1664) 2019-02-28 17:15:07 +05:30
Rishichandra Wawhal
a002d3ad2a refactor console code, update react to 16.8.2 (close #1467) (#1608) 2019-02-28 17:13:06 +05:30
Nathan Waters
9cfdef3645 add fuzzy match search example to custom function docs (#1555) 2019-02-28 15:30:16 +05:30
Jonathan Chhabra
7d61422888 add section for unauthorized role in auth0 guide (#1484) 2019-02-28 15:08:16 +05:30
Shahidh K Muhammed
fdd5784bf7
test server upgrade from last release (close #570) (#1667) 2019-02-27 20:42:47 +05:30
Shahidh K Muhammed
1be8faebea
update pull request template (#1672) 2019-02-27 16:56:31 +05:30
Rikin Kachhia
e5290d4281
fix console sidebar links highlighting (#1657) 2019-02-26 12:34:14 +05:30
Rikin Kachhia
56a08a16b5
make button texts consistent across event trigger and remote schemas (close #1634) (#1666) 2019-02-26 12:23:36 +05:30
Tirumarai Selvan
32ef67a20c remove stale folder for gatsby nextjs boilerplates (#1652) 2019-02-25 12:52:09 +05:30
Rakesh Emmadi
c731fde1e3 enforce column presets of update permission with upserts (fix #1647) (#1653) 2019-02-23 16:06:42 +05:30
Tirumarai Selvan
7851015cb2 refactor event processing logic (#1639) 2019-02-22 17:55:36 +05:30
Rakesh Emmadi
0833d35088 generate scalar types for SQL function arguments (fix #1632) (#1633)
Also involved a refactor of the internals to localise the context needed for each field
2019-02-22 15:57:38 +05:30
Anne Ogborn
6eae576e79 update dependencies needed for apollo in apollo-subscriptions guide (close #1643) (#1644) 2019-02-22 12:00:52 +05:30
Rikin Kachhia
626af8939f
handle empty header key in console APIExplorer (#1641) 2019-02-22 11:59:23 +05:30
Pilou
e7fba40fad added auth-jwt-roles boilerplate (#1570)
Added a boilerplate from [this original repository](https://github.com/platyplus/authentication-server) based on the discussions in [this issue](https://github.com/hasura/graphql-engine/issues/1420) and [this issue](https://github.com/hasura/graphql-engine/issues/1446).

[skip ci]
2019-02-21 16:42:47 +05:30
Praveen Durairaj
5fc2df2766 add nextjs-8-serverless sample app (#1640) 2019-02-21 15:27:20 +05:30
Shahidh K Muhammed
d3b994885e add google cloud gke cloud sql deployment guide to docs (close #1386) (#1628) 2019-02-20 14:09:50 +05:30