Commit Graph

734 Commits

Author SHA1 Message Date
Praveen Durairaj
3502dab419 update dockerfile (#1820)
update dockerfile for whatsapp-clone auth-server [skip ci]
2019-03-19 15:47:29 +05:30
Rikin Kachhia
2bc2c40532
handle capital letters and quotes in Raw SQL Track this (#1811) 2019-03-19 14:23:19 +05:30
Rishichandra Wawhal
97ac88edb5 fix relationship editor bug in console (#1814) 2019-03-19 14:22:31 +05:30
Praveen Durairaj
6223852e9d add whatsapp-clone sample app (#1730)
This is a forked version of Urigo's [WhatsApp Clone](https://github.com/Urigo/WhatsApp-Clone-server), integrated with Hasura.
Hasura GraphQL APIs are used in place of custom resolvers. A simple JWT server replaces the original auth server. Image uploads use the same Cloudinary APIs.
[Original React Client](https://github.com/Urigo/WhatsApp-Clone-Client-React) has been updated to match Hasura APIs and typescript definitions have been generated using GraphQL Code Generator.
2019-03-19 12:15:41 +05:30
Rishichandra Wawhal
2777b45335 add onegraph explorer to graphiql online (close #1816 ) (#1817) 2019-03-19 12:14:04 +05:30
Shahidh K Muhammed
a5890623c4
specify needed node version, clarify setup instructions (close #1754) (#1815) 2019-03-19 10:42:50 +05:30
Anon Ray
6e464a1342 pg permission docs: make hasura user owner of system schemas (fix #1697) (#1727)
There was a postgres permission issue in the docs. The hasura user
  needed to be owner of the system schemas (hdb_catalog), otherwise it
  won't be able to table schema changes during version upgrades.
2019-03-19 10:06:40 +05:30
Tirumarai Selvan
8615c306ec add for update skip locked to fetch query (#1798) 2019-03-19 10:00:44 +05:30
Karthik Venkateswaran
ead7e614a0 remove graphiql suggestions on page navigation (#1803) 2019-03-18 23:45:47 +05:30
Rishichandra Wawhal
bcb3fb4fab reload onegraph schema on header change (#1810) 2019-03-18 23:21:42 +05:30
Aravind Shankar
040bef2fd5 add options to create migration from files from sql and server (close #1699) (#1761) 2019-03-18 22:10:04 +05:30
Vamshi Surabhi
24dcefb142
use bytestring builder to represent encoded json (#1800) 2019-03-18 21:52:21 +05:30
Rakesh Emmadi
4970fde767 document unique/primary key constraint requirement for mutation response (#1776) 2019-03-18 13:51:58 +05:30
Rishichandra Wawhal
3d81e02026 add onegraph explorer to console (close #1616) (#1680) 2019-03-18 11:05:35 +05:30
Anon Ray
961f1af528 send error not connection_error on query validation errors (fix #1790) (#1792) 2019-03-17 17:30:54 +05:30
Rikin Kachhia
df8216b576
show migration name section only if This is migration is checked (close #1732) (#1762) 2019-03-16 15:11:59 +05:30
Tirumarai Selvan
a26716cb0a change try it out link for remote schema in console #1788 2019-03-15 14:55:53 +05:30
Rishichandra Wawhal
fb9df2ac94 fix constructor initialization in graphql2chartjs (#1787) 2019-03-15 14:11:33 +05:30
Shahidh K Muhammed
7ef7e99661
npm audit fix for packages in community folder (#1785) 2019-03-15 12:34:29 +05:30
Vamshi Surabhi
c7346fd55a bump stackage to lts 13 and refer to hasura's pg-client-hs (#1747) 2019-03-14 20:25:33 +05:30
Rishichandra Wawhal
a9cd694eff add graphql2chartjs to community tools (#1669) 2019-03-14 14:30:41 +05:30
Tanmai Gopal
75ec309e8a update auth0 jwt guide to add debug instructions (close #1769) (#1771) 2019-03-14 14:10:13 +05:30
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