Commit Graph

766 Commits

Author SHA1 Message Date
Aravind Shankar
ca7d8b3df5 rename metadata reset to metadta clear (close #1851) (#1893)
The word "reset" is little ambiguous (reset to scratch or reset to last known consistent state). metadata reset clears the all the metadata to mimic a freshly installed hasura instance. This actually invokes the clear_metadata API in the backend and hence should also be called metadata clear for perfect clarity.

All references to metadata reset should be changed to metadata clear.
2019-03-29 10:44:56 +05:30
Shahidh K Muhammed
7bfcc764db update migration, api-reference docs (close #766) (close #1345) (close #1496) (#1701) 2019-03-28 16:21:58 +05:30
Simone Busoli
f6c11e545d fix bash completion example docs on cli (#1832) 2019-03-28 07:28:20 +05:30
Shahidh K Muhammed
9630149663 npm security fixes 2019-03-27 22:08:43 +05:30
Shahidh K Muhammed
42a25f044e
add script and now.sh function to edit pg_dump output (close #1861) (#1884)
<!-- Thank you for submitting this PR! :) -->
<!-- Provide a general summary of your changes in the Title above ^, end with (close #<issue-no>) or (fix #<issue-no>) -->

### Description
<!-- The title might not be enough to convey how this change affects the user. -->
<!-- Describe the changes from a user's perspective -->
This PR adds a bash script and a serverless function to clean up the output of `pg_dump` so that it can be used as a migration file for Hasura. This can be later integrated with the CLI so that the cleanup is handled by CLI.

### Affected components 
<!-- Remove non-affected components from the list -->

- Scripts

### Related Issues
<!-- Please make sure you have an issue associated with this Pull Request -->
<!-- And then add `(close #<issue-no>)` to the pull request title -->
<!-- Add the issue number below (e.g. #234) -->
#1861 
### Solution and Design
<!-- How is this issue solved/fixed? What is the design? -->
<!-- It's better if we elaborate -->
- A serverless function written in Go gets the SQL content though HTTP POST.
- A set of pre-defined lines are removed from this SQL string.
- SQL comments are removed using regex matching.
- Postgres triggers created by Hasura for use with event triggers are removed with regex matching.
- Empty newlines are removed by regex matching.
- Resulting string is returned in the HTTP response.
### Steps to test and verify
<!-- If this is a feature, what are the steps to try them out? -->
<!-- If this is a bug-fix, how do we verify the fix? -->
```bash
curl --data-binary @filename.sql https://hasura-edit-pg-dump.now.sh > newfile.sql
```

### Limitations, known bugs & workarounds
<!-- Limitations of the PR, known bugs and suggested workarounds -->
NA
<!-- Feel free to delete these comment lines -->
2019-03-27 21:36:58 +05:30
Rishichandra Wawhal
c7fdf013fa firebase2graphql(v0.0.1-alpha8) example usage fix (#1881) 2019-03-27 15:22:00 +05:30
comerc
6585e3d78f fix a typo in boilerplates/auth-webhooks/passport-js (#1351) 2019-03-27 14:17:23 +05:30
Rishichandra Wawhal
9dc833c808 add visual studio code integration guide to docs (close #1656) (#1828)
add visual studio code guide to docs (close #1656)
2019-03-27 14:07:54 +05:30
samuela
0f57e4cb4d update jwt docs (#1850) 2019-03-27 14:02:47 +05:30
Praveen Durairaj
b3bf0b029d graphiql-online upgrade deployment to now 2.0 (close #1838) (#1858) 2019-03-27 13:56:04 +05:30
Vamshi Surabhi
ada35c2236 add user information to transactions in ws protocol (fix #1867) (#1869)
This bug introduced with the refactor in 739ff80a51.
2019-03-26 16:38:27 +05:30
Vamshi Surabhi
8e9a6a25a9 bump haskell-docker-packager version (#1870)
The previous version didn't include libgcc_s.so.1 in rootfs. We never encountered an error before as it was most likely packaged by busybox.
2019-03-26 15:26:15 +05:30
Praveen Durairaj
26ed94fb19 add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
Takeshi Amano
c344899976 add japanese translation for readme (#1833) 2019-03-26 11:15:46 +05:30
Shahidh K Muhammed
058fc61a05 update manifests to v1.0.0-alpha41 2019-03-26 10:33:01 +05:30
Vamshi Surabhi
739ff80a51 refactor graphql query execution logic (#1855) 2019-03-25 23:55:25 +05:30
Tirumarai Selvan
36781199d0 breaking: drop id from event_triggers table (fix #1840) (#1857) 2019-03-25 22:40:52 +05:30
Karthik Venkateswaran
d93e3b533c use inflection to suggest relationship names (close #1665) (#1801)
This breaks existing behaviour on how relationship names are generated.
2019-03-25 20:25:24 +05:30
Toan Nguyen
560c31f9fd add a json path argument to query values inside json columns (close #1598) (#1661) 2019-03-25 19:15:35 +05:30
Shahidh K Muhammed
b8700cce70
add spatial predicates for geography columns (close #1674) (#1735)
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
Rikin Kachhia
1ba382193e update console and docs favicons (close #1485) (#1760) 2019-03-25 15:42:56 +05:30
Vamshi Surabhi
d61c90f1b7
validate relationship definitions on startup (#1849) 2019-03-25 14:26:29 +05:30
Shahidh K Muhammed
2274e2748b Revert "reduce server build time on ci (#1836)"
This reverts commit cbd6bb1f15.
2019-03-25 09:49:23 +05:30
Anon Ray
cbd6bb1f15 reduce server build time on ci (#1836)
Due to a misconfiguration in the caching logic, a server was building dependencies on every build. This fixes it to reduce server build time.
2019-03-22 18:11:15 +05:30
Rakesh Emmadi
5bafdce9a3 fix delete mutation returning incorrect data (fix #1794) (fix #1763) (#1827)
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 #1794. 
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
Praveen Durairaj
420dde77dc add auth0 tutorial link to react-apollo-todo landing page (#1819) 2019-03-22 12:28:20 +05:30
Tirumarai Selvan
ed9a5b962a add rest-wrapper remote schema boilerplate (#1826) 2019-03-20 16:15:45 +05:30
Praveen Durairaj
2ee9820c22 update whatsapp clone sample app (#1822) 2019-03-20 15:03:04 +05:30
Praveen Durairaj
42b1d16625 add quasar framework sample app (#1825) 2019-03-20 12:42:50 +05:30
Vamshi Surabhi
ac1749c764 add type, variable information to input value's ast (close #21) (#1809) 2019-03-20 12:01:49 +05:30
Aravind Shankar
8043ddeebf accept a json or yaml file for metadata apply command (close #1698) (#1746) 2019-03-20 10:40:06 +05:30
dsandip
a01ec9b2e2 Change license for core GraphQL Engine to Apache 2.0 (#1821) 2019-03-19 16:23:36 +05:30
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