Commit Graph

4371 Commits

Author SHA1 Message Date
SidharthBihary
2cbc24cf3f docs: update datadog docs for new regions support and UI change
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4603
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 3d82fbb2c581ff4683b8585d235476bcc0cac49f
2022-06-08 09:39:36 +00:00
paritosh-08
8f09253514 docs: naming convention
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4589
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 6bf4d13d683ed17b112b79a1a57b92984fe39b0a
2022-06-08 08:44:18 +00:00
Vishnu Bharathi
af20404ac0 ci: tag release v2.8.0-beta.1 and v2.8.0-beta.1-pro.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4659
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 85914a11c339d9d77f265da702e38d3f9f46ff59
2022-06-08 08:31:09 +00:00
Erik Magnusson
cb638e7168 refactor (console): migrate insert rows tab to tailwind
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4599
GitOrigin-RevId: c78bcf061fd935b0c566466135f673175cd11cf7
2022-06-08 08:00:15 +00:00
Vishnu Bharathi
952a3f6481 ci: updates base image for ubuntu and centos flavours
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4502
GitOrigin-RevId: 0897d097b5698f5751b7bfc72801dbfdb19e90c2
2022-06-08 07:07:28 +00:00
Philip Lykke Carlsen
3e33fd6ff7 Make on_conflict schema available abstract of update permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4390
GitOrigin-RevId: 5f3f9da173cad37f9330c5a27fd1edfc2559a4d6
2022-06-07 23:25:48 +00:00
Divi
b7c414a875 ci: add action to release cli-ext binaries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4342
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 2b7686bda333d977aa20a1ff10f7b3179509eac3
2022-06-07 22:25:41 +00:00
Rakesh Emmadi
270fe74f67 server/bigquery: define select permissions for computed fields returning custom table schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4628
GitOrigin-RevId: 604b4d592dc438c88790add6319ee4f246cc25b9
2022-06-07 16:50:17 +00:00
Antoine Leblanc
e3c2bf53a5 Move, document, and prune action types and custom types types.
### Description

This PR is a first step in a series of cleanups of action relationships. This first step does not contain any behavioral change, and it simply reorganizes / prunes / rearranges / documents the code. Mainly:
- it divides some files in RQL.Types between metadata types, schema cache types, execution types;
- it renames some types for consistency;
- it minimizes exports and prunes unnecessary types;
- it moves some types in places where they make more sense;
- it replaces uses of `DMap BackendTag` with `BackendMap`.

Most of the "movement" within files re-organizes declarations in a "top-down" fashion, by moving all TH splices to the end of the file, which avoids order or declarations mattering.

### Optional list types

One main type change this PR makes is a replacement of variant list types in `CustomTypes.hs`; we had `Maybe [a]`, or sometimes `Maybe (NonEmpty a)`. This PR harmonizes all of them to `[a]`, as most of the code would use them as such, by doing `fromMaybe []` or `maybe [] toList`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4613
GitOrigin-RevId: bc624e10df587eba862ff27a5e8021b32d0d78a2
2022-06-07 15:45:00 +00:00
Rakesh Emmadi
854a76c5b1 docs: add BigQuery computed fields feature page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4591
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: b06af8ce4812790bcdfd3348af544ba7d99e5b17
2022-06-07 14:38:14 +00:00
Antoine Leblanc
eaba2e08d3 Clean Relay's code, break schema cycles, introduce Node ID V2
## Motivation

This PR rewrites most of Relay to achieve the following:
- ~~fix a bug in which the same node id could refer to two different tables in the schema~~
- remove one of the few remaining uses of the source cache in the schema building code

In doing so, it also:
- simplifies the `BackendSchema` class by removing `node` from it,
- makes it much easier for other backends to support Relay,
- documents, re-organizes, and clarifies the code.

## Description

This PR introduces a new `NodeId` version ~~, and adapts the Postgres code to always generate this V2 version~~. This new id contains the source name, in addition to the table name, in order to disambiguate similar table names across different sources (which is now possible with source customization). In doing so, it now explicitly handles that case for V1 node ids, and returns an explicit error message instead of running the risk of _silently returning the wrong information_.

Furthermore, it adapts `nodeField` to support multiple backends; most of the code was trivial to generalize, and as a result it lowers the cost of entry for other backends, that now only need to support `AFNodeId` in their translation layer.

Finally, it removes one more cycle in the schema building code, by using the same trick we used for remote relationships instead of using the memoization trick of #4576.

## Remaining work

- ~~[ ]write a Changelog entry~~
- ~~[x] adapt all tests that were asserting on an old node id~~

## Future work

This PR was adapted from its original form to avoid a breaking change: while it introduces a Node ID V2, we keep generating V1 IDs and the parser rejects V2 IDs. It will be easy to make the switch at a later data in a subsequent PR.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4593
GitOrigin-RevId: 88e5cb91e8b0646900547fa8c7c0e1463de267a1
2022-06-07 13:36:29 +00:00
Naveen Naidu
0817d46f1a server: log details of healthcheck failure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4634
GitOrigin-RevId: 9a0c2ecd3db3fba15e352c9318127a82a36ac52b
2022-06-07 11:24:20 +00:00
Erik Magnusson
f3278de0a7 refactor (console): migrate old browse rows' css to tailwind
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4609
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
GitOrigin-RevId: 4e89125550c24ff058eadd53c0769893c8087936
2022-06-07 10:42:56 +00:00
Erik Magnusson
74fdabf4e2 Con 229 migrate remote schemas to tailwind
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4565
GitOrigin-RevId: dbba6febf20c850a41ba9e54358d32f1c84f8ab3
2022-06-07 09:57:22 +00:00
Puru Gupta
93e58e093b multitenant: fix serialisation error in scheduled triggers on startup (fix #4360)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4625
GitOrigin-RevId: d61f46d0e8208d7d6fb0f3abfa3ae87329ef94e5
2022-06-07 07:09:56 +00:00
Karthikeyan Chinnakonda
d905911eab server: disable query/subscription root fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4524
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 1cae7a1596825925da9e82c2675507482f41c3fb
2022-06-07 05:33:12 +00:00
Solomon
01f56735ac Feature/gdw 113
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4620
GitOrigin-RevId: f732fff4f3f2449ebc97f76522ee6ad11bcfbc68
2022-06-07 01:35:38 +00:00
Tirumarai Selvan
2c8452396f docs: add a note about different hasura instances connecting to the same database
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4637
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: b564f1037a5e31c7085c2b6aa5a364aa4a4e5c78
2022-06-06 10:16:24 +00:00
Rakesh Emmadi
524819b4b7 server: rename spiScalarComputedFields to spiComputedFields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4629
GitOrigin-RevId: 53d72d8ed73ecab486718f424bbd8d30c6f423bf
2022-06-06 07:24:03 +00:00
Puru Gupta
ebc8cd5134 server: do not serialize env vars in logs or errors: PR III - Event Triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4521
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com>
GitOrigin-RevId: c7702e8f3da466dc108936328de30ceb87df258a
2022-06-05 20:28:13 +00:00
Matt Hardman
0390bd449b console: integrate relationships table component to Data tab
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4353
GitOrigin-RevId: 558b4d02be04e932c02dee885d7c7d4dea983a33
2022-06-05 06:51:56 +00:00
Aravind K P
384756f7be cli: support multiple admin secrets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4566
GitOrigin-RevId: b03008099ec0b053fd24798b2b78d12471ed6fdd
2022-06-03 13:29:56 +00:00
Samir Talwar
807fdd7347 console: Automatically install node_modules.
When running `npm run server-build`, this step will make sure that `npm
ci` is run first if necessary.

It will run whenever _package.json_ or _package-lock.json_ are changed.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4624
GitOrigin-RevId: ac3fb326938746e50ad743504493896011d45f0f
2022-06-03 12:40:27 +00:00
pranshi06
056765578f server: add support for custom scalar in action output types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4185
GitOrigin-RevId: 16a24fdcdbd195b4b59bcca7957c469ba073dabb
2022-06-03 09:48:26 +00:00
David Overton
6586053296 Gdw 85/capabilities endpoint
>

## Description ✍️

- Creates a new `/capabilities` endpoint for the GDC agent API
- Removes capabilities from the `/schema` endpoint
- Removes the `/config-schema` endpoint and includes the `ConfigSchemaResponse` within the `CapabilitiesResponse`

### Related Issues ✍
->

https://hasurahq.atlassian.net/browse/GDW-85

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4478
GitOrigin-RevId: 426662ee9e751343d94207d439a5025df65d2de7
2022-06-03 08:08:23 +00:00
Samir Talwar
ccbeea0e8b console: Factor out downloading assets.
This pulls the script to download the common assets out of the
`server-build` Makefile target into its own target. Because we use the
output directory name as the target, we allow `make` to decide whether
it's necessary.

As there are no inputs to the target, it will only be done once.

Behavior should be unaffected.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4617
GitOrigin-RevId: 15d64467c92be761f2738d179b1b027abe8bd8ca
2022-06-03 07:23:52 +00:00
Vijay Prasanna
2fe553df47 fix (console): fixes broken alignment in manage database table
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4623
GitOrigin-RevId: 426336272835c680d3ec675588d30e925369a11f
2022-06-03 06:01:59 +00:00
Varun Choudhary
09333e3e47 console: add recommendation note to add remote schema via env vars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4615
GitOrigin-RevId: a74fb7eaf8115a67916cedeb58a73c2529b15de4
2022-06-02 11:39:57 +00:00
Nicolas Beaussart
5abd0a8b81 remove font awesome and fix the setting gears
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4595
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
GitOrigin-RevId: 8c735dad289e619c4b79141043c76c14ebfd24be
2022-06-02 09:22:54 +00:00
Varun Choudhary
55ab5c1d48 console: allow users to add remote schema URL from env var [CON-191]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4561
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 835c476082abcb16cdfaafa4679d6870c445f395
2022-06-02 08:31:05 +00:00
Daniel Chambers
e5c1106864 server: Send source name as a header to Data Connector agents [GDW-110]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4614
GitOrigin-RevId: f7828d4c0bbf4c46059b08b86b22915cc8de3cbf
2022-06-02 05:23:51 +00:00
Daniel Chambers
1dbdb0236c server: Data Connector IR refactor, support for column boolean comparison expressions [GDW-114]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4579
GitOrigin-RevId: 84da015123a53124488b88ce66bde26113625754
2022-06-02 02:07:57 +00:00
hasura-bot
e48f3cbef1 Add _cast support for other postgres datatypes fix #6050 and fix #5426
GITHUB_PR_NUMBER: 8524
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8524

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4551
Co-authored-by: Abdullah Saleem <5978905+abdullah2993@users.noreply.github.com>
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: f85742318167d1e51f463c45fcd00f26269c2555
2022-06-01 16:41:49 +00:00
Puru Gupta
382e99f3cc Add ACTION_WEBHOOK_HANDLER env variable to dev.sh
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4602
GitOrigin-RevId: b1fc97dfee85aeba68272f91550ead53a0ed777a
2022-06-01 08:06:55 +00:00
Tom Harding
a3031aed03 Add Weeder, begin weeding (1/?)
## Description

This PR adds a config file for [`weeder`](https://github.com/ocharles/weeder) to the `-mono` repository. `weeder` checks for dead code by building a call graph from the given entry points (currently every module named `Main` with a `main` function) and then marking every function _not_ in that call graph as dead code.

To avoid very large PRs, I'm going to tackle this in a series. This first PR adds the basic configuration, plus removes as many weeds as it took for me to realise this was going to become a very big PR. The PRs after this will largely be removing dead code, until the final PR that will add Weeder to the CI pipeline.

### Related Issues

This closes #2973.

## Affected components

- Server

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4572
GitOrigin-RevId: ac8eaa9473e5ac1f16babcb35388694392d0d7dc
2022-05-31 15:43:34 +00:00
Naveen Naidu
11867b50a4 server: extend backend_only setting for update and delete permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4530
Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: c4c1a3bd9736ec275e77c6f55c76049c550443f9
2022-05-31 14:42:14 +00:00
Matt Hardman
f611ee232a CON-151-create-db-to-local-relationship-hook-for-object-and-array-relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4472
GitOrigin-RevId: e10abcfa861067ba101348d0cd4e670b8dcbadf8
2022-05-31 11:44:41 +00:00
paritosh-08
e053ffe8ec server: hotfix for default naming convention issue
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4585
GitOrigin-RevId: 8e9e7eef0017e9c634167b08c4d2a61ee7ac1fdf
2022-05-31 09:09:04 +00:00
Varun Choudhary
2447b43017 CON-190-add tooltip message to header section of remote schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4559
GitOrigin-RevId: d4edd80e5b38930f43172bb00392102a26812196
2022-05-31 06:50:30 +00:00
pranshi06
cd0f674821 server: Adds support to return array of scalars in Actions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3661
GitOrigin-RevId: bc37e7aa0cb861069536aa97aa4dff1fdc05e08b
2022-05-31 05:23:47 +00:00
Auke Booij
13fc1c62d1 Move Hasura.GraphQL.Parser.Column to .RQL.IR. and .GraphQL.Schema.
This is a first step towards clarifying the role of `UnpreparedValue` as part of the IR. It certainly does not belong in the parser framework.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4588
GitOrigin-RevId: d1582a0b266729b79e00d31057178a4099168e6d
2022-05-30 22:07:57 +00:00
Gil Mizrahi
a598ca47c2 tests-hspec init mssql - use 127.0.0.1 instead of localhost for sqlcmd
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4590
GitOrigin-RevId: 67e3c6a5d1aa77e2fd180678ec5a619f7b78e65a
2022-05-30 21:05:05 +00:00
Abby Sassel
1f68bd3c03 server/docs: add error message to troubleshooting.md
for easier searchability. from discussion at https://hasurahq.slack.com/archives/CV3UR1MT2/p1653911179537459?thread_ts=1653656301.295359&cid=CV3UR1MT2

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4586
GitOrigin-RevId: d0df3eade14050f99d549dc004372a4fb0ec378a
2022-05-30 15:28:35 +00:00
Rakesh Emmadi
af6eb1232e server/bigquery: computed fields SQL generation and execution
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4555
GitOrigin-RevId: c668cb6bd76ed646b9449d8037c2f9038c99e3a8
2022-05-30 15:24:33 +00:00
Abhijeet Khangarot
b09bb602bd console: add support for application/x-www-form-urlencoded in rest connectors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4354
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 44dc48f3f226c57aac4393133245bf70d5f68acd
2022-05-30 13:51:15 +00:00
Tom Harding
59df4dffb3 [gh-pages] Remove broken haddock links from hasura.github.io
Hello!

I noticed that on [the deployed docs](https://hasura.github.io/graphql-engine/server/), [the first Haddock link](https://hasura.github.io/graphql-engine/server/haddock) and alpha/beta links were broken. I've removed the broken links and checked the other two.

Thanks!

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4536
GitOrigin-RevId: 52d575996c01c2ebf2396987b39474013c93812d
2022-05-30 12:22:49 +00:00
Gil Mizrahi
ae0dae0eed fix insertion of multiple empty objects
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4583
GitOrigin-RevId: a4eebf7d734c6556c2509ac66ccafbdb520189ba
2022-05-30 12:18:36 +00:00
Antoine Leblanc
8a999bd44d Structural updates to the server's engineering documentation
### Description

This PR does several things:
- it cleans up some structural issues with the engineering documentation:
  - it harmonizes the table of contents structure across different files
  - adds a link to the bigquery documentation
  - moves some files to a new `deep-dives` subfolder
  - puts a title at the top of each page to avoid github assuming their title is "table of contents"
- it pre-fills the glossary with a long list of words that could use an entry (all empty for now)
- it adds the only remaining relevant server file from [hasura-internal's wiki](https://github.com/hasura/graphql-engine-internal/wiki): the old "multiple backends architecture" file

### Discussion

A few things worth discussing in the scope of this PR:
- is it worth migrating old documentation such as the multiple backends architecture, that document a decision process rather instead of being up-to-date reflections of the code? are we planning to delete hasura-internal?
- should we focus instead on _new_ documentation, aimed to be kept up to date?
- are there other old documents we want to move in here, or is that it?
- is this glossary structure ok, or would a purely alphabetical structure make sense?
- does it make sense to have the glossary only in the engineering section? more generally, _what's our broader plan for documentation_?

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4537
GitOrigin-RevId: c2b674657b19af7a75f66a2a304c80c30f5b0afb
2022-05-30 09:46:06 +00:00
Abby Sassel
2518d16191 Create troubleshooting.md
Documenting a workaround discussed at https://hasurahq.slack.com/archives/C03263T1L9W/p1653561662369129 in a new Troubleshooting doc

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4575
GitOrigin-RevId: eb80662b93f157d363cd0b53993fc5bb5972b546
2022-05-30 09:18:44 +00:00
Marion Schleifer
b2ff3162c1 docs: update authz docs
Based on this [feedback](https://hasurahq.slack.com/archives/C015EA71MU0/p1651061643434309).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4403
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 68bff5f9fa3dea8a4b7bff43be17982fa52e3d36
2022-05-30 08:55:27 +00:00