Skip to content

Commit

Permalink
Merge branch 'master' into docs-page-track-relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
marionschleifer committed Oct 8, 2020
2 parents 2827434 + 2717c38 commit 75ff57c
Show file tree
Hide file tree
Showing 144 changed files with 4,746 additions and 1,710 deletions.
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

## Next release

### Heterogeneous execution

Previous releases have allowed queries to request data from either Postgres or remote schemas, but not both. This release removes that restriction, so multiple data sources may be mixed within a single query. For example, GraphQL Engine can execute a query like

```
query {
articles {
title
}
weather {
temperature
}
}
```

where the articles are fetched from the database, and the weather is fetched from a remote server.

### Server - Support for mapping session variables to default JWT claims

Some auth providers do not let users add custom claims in JWT. In such cases, the server can take a JWT configuration option called `claims_map` to specify a mapping of Hasura session variables to values in existing claims via JSONPath or literal values.
Expand Down Expand Up @@ -58,10 +75,17 @@ This release contains the [PDV refactor (#4111)](https://github.com/hasura/graph
- server: change `created_at` column type from `timestamp` to `timestamptz` for scheduled triggers tables (fix #5722)
- server: allow configuring timeouts for actions (fixes #4966)
- server: accept only non-negative integers for batch size and refetch interval (close #5653) (#5759)
- server: limit the length of event trigger names (close #5786)
**NOTE:** If you have event triggers with names greater than 42 chars, then you should update their names to avoid running into Postgres identifier limit bug (#5786)
- console: allow user to cascade Postgres dependencies when dropping Postgres objects (close #5109) (#5248)
- console: mark inconsistent remote schemas in the UI (close #5093) (#5181)
- cli: add missing global flags for seeds command (#5565)
- cli: add missing global flags for seed command (#5565)
- cli: allow seeds as alias for seed command (#5693)
- console: remove ONLY as default for ALTER TABLE in column alter operations (close #5512) #5706
- console: add option to flag an insertion as a migration from `Data` section (close #1766) (#4933)
- console: add `<3 hasura` section to view updates and notifications from Hasura (#5070)
- docs: add docs page on networking with docker (close #4346) (#4811)
- docs: add postgres concepts page to docs (close #4440) (#4471)


## `v1.3.2`
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Hasura graphql-engine

_First_: if you feel insecure about how to start contributing, feel free to ask us on our [Discord channel](https://discordapp.com/invite/hasura), in the #contrib channel or as a DM to Marion (@marion#9554). You can also just go ahead with your contribution and we'll give you feedback. Don't worry - the worst that can happen is that you'll be politely asked to change something. We appreciate any contributions, and we don't want a wall of rules to stand in the way of that.
_First_: if you feel insecure about how to start contributing, feel free to ask us on our [Discord channel](https://discordapp.com/invite/hasura) in the #contrib channel. You can also just go ahead with your contribution and we'll give you feedback. Don't worry - the worst that can happen is that you'll be politely asked to change something. We appreciate any contributions, and we don't want a wall of rules to stand in the way of that.

However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover what we're looking for. By addressing the points below, the chances that we
can quickly merge or address your contributions will increase.
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ func NewSeedCmd(ec *cli.ExecutionContext) *cobra.Command {
v := viper.New()
ec.Viper = v
seedCmd := &cobra.Command{
Use: "seeds",
Aliases: []string{"sd"},
Use: "seed",
Aliases: []string{"sd", "seeds"},
Short: "Manage seed data",
SilenceUsage: true,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
Expand Down
16 changes: 15 additions & 1 deletion cli/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"fmt"
"io"
"os"
"strings"
"sync"
"text/tabwriter"
"time"
Expand Down Expand Up @@ -1849,9 +1850,22 @@ func (m *Migrate) ApplySeed(q interface{}) error {
func (m *Migrate) ExportDataDump(tableNames []string) ([]byte, error) {
// to support tables starting with capital letters
modifiedTableNames := make([]string, len(tableNames))

for idx, val := range tableNames {
modifiedTableNames[idx] = fmt.Sprintf(`"%s"`, val)
split := strings.Split(val, ".")
splitLen := len(split)

if splitLen != 1 && splitLen != 2 {
return nil, fmt.Errorf(`invalid schema/table provided "%s"`, val)
}

if splitLen == 2 {
modifiedTableNames[idx] = fmt.Sprintf(`"%s"."%s"`, split[0], split[1])
} else {
modifiedTableNames[idx] = fmt.Sprintf(`"%s"`, val)
}
}

return m.databaseDrv.ExportDataDump(modifiedTableNames)
}

Expand Down
43 changes: 35 additions & 8 deletions console/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["airbnb", "prettier"],
"extends": [
"airbnb",
"prettier"
],
"env": {
"browser": true,
"node": true,
Expand All @@ -20,7 +23,13 @@
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,
"comma-dangle": 0,
"id-length": [1, { "min": 1, "properties": "never" }],
"id-length": [
1,
{
"min": 1,
"properties": "never"
}
],
"indent": "off",
"no-console": 0,
"arrow-parens": 0,
Expand All @@ -47,7 +56,13 @@
"camelcase": 0,
"object-curly-newline": 0,
"spaced-comment": 0,
"prefer-destructuring": ["error", { "object": false, "array": false }],
"prefer-destructuring": [
"error",
{
"object": false,
"array": false
}
],
"prefer-rest-params": 0,
"function-paren-newline": 0,
"no-case-declarations": 0,
Expand Down Expand Up @@ -96,7 +111,10 @@
],
"settings": {
"import/resolve": {
"moduleDirectory": ["node_modules", "src"]
"moduleDirectory": [
"node_modules",
"src"
]
}
},
"globals": {
Expand All @@ -117,13 +135,19 @@
"prettier"
],
"parser": "@typescript-eslint/parser",
"files": ["*.ts", "*.tsx"],
"files": [
"*.ts",
"*.tsx"
],
"rules": {
"jsx-a11y/label-has-for": [
0,
{
"required": {
"some": ["nesting", "id"]
"some": [
"nesting",
"id"
]
}
}
],
Expand All @@ -149,8 +173,11 @@
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-unused-expressions": ["error"],
"@typescript-eslint/no-unused-expressions": [
"error"
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
/**
* Disable things that are checked by Typescript
*/
Expand Down Expand Up @@ -184,4 +211,4 @@
}
}
]
}
}
2 changes: 1 addition & 1 deletion console/cypress/integration/data/insert-browse/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export const passDeleteRow = () => {
cy.on('window:confirm', str => {
expect(
str.indexOf('This will permanently delete this row from this table') !==
-1
-1
).to.be.true;
});
cy.get(getElementFromAlias('table-browse-rows')).contains('20');
Expand Down
37 changes: 30 additions & 7 deletions console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@graphql-codegen/core": "1.13.5",
"@graphql-codegen/typescript": "1.13.5",
"@types/highlight.js": "9.12.4",
"@types/lodash": "^4.14.159",
"@types/sql-formatter": "2.3.0",
"ace-builds": "^1.4.11",
"apollo-link": "1.2.14",
Expand All @@ -65,6 +66,7 @@
"inflection": "1.12.0",
"isomorphic-fetch": "2.2.1",
"jsonwebtoken": "8.5.1",
"jwt-decode": "2.2.0",
"less": "3.11.1",
"moment": "^2.26.0",
"piping": "0.3.2",
Expand Down Expand Up @@ -98,6 +100,7 @@
"subscriptions-transport-ws": "0.9.16"
},
"devDependencies": {
"@types/jwt-decode": "2.2.1",
"@babel/core": "7.9.6",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.10.1",
Expand All @@ -116,7 +119,6 @@
"@types/fork-ts-checker-webpack-plugin": "0.4.5",
"@types/isomorphic-fetch": "0.0.35",
"@types/jquery": "3.3.33",
"@types/lodash": "4.14.149",
"@types/mini-css-extract-plugin": "0.9.1",
"@types/node-sass": "4.11.0",
"@types/optimize-css-assets-webpack-plugin": "5.0.1",
Expand Down
2 changes: 2 additions & 0 deletions console/src/Endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const Endpoints = {
hasuractlMetadata: `${hasuractlUrl}/apis/metadata`,
hasuractlMigrateSettings: `${hasuractlUrl}/apis/migrate/settings`,
telemetryServer: 'wss://telemetry.hasura.io/v1/ws',
consoleNotificationsStg: 'https://data.hasura-stg.hasura-app.io/v1/query',
consoleNotificationsProd: 'https://data.hasura.io/v1/query',
};

const globalCookiePolicy = 'same-origin';
Expand Down
2 changes: 2 additions & 0 deletions console/src/Globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SERVER_CONSOLE_MODE } from './constants';
import { getFeaturesCompatibility } from './helpers/versionUtils';
import { stripTrailingSlash } from './components/Common/utils/urlUtils';
import { isEmpty } from './components/Common/utils/jsUtils';
import { Nullable } from './components/Common/utils/tsUtils';

// TODO: move this section to a more appropriate location

Expand All @@ -22,6 +23,7 @@ declare global {
serverVersion: string;
consolePath: string;
cliUUID: string;
consoleId: Nullable<string>;
};
}
const CONSOLE_ASSET_VERSION: string;
Expand Down
2 changes: 1 addition & 1 deletion console/src/components/App/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CONNECTION_FAILED = 'App/CONNECTION_FAILED';
* title: string null
* message: string null
* autoDismiss: integer 5, set to 0 to not auto-dismiss
* dismissible: bool true, set if user can dismiss notification
* dismissible: 'button', set if the user can dismiss the notification, false otherwise
* action: object null, action button with label string and callback function
* children: element/string, null, add custom element, over-rides action
* onAdd: function, null, called when notification is successfully created, 1st argument is the notification
Expand Down
36 changes: 0 additions & 36 deletions console/src/components/AppState.js

This file was deleted.

Loading

0 comments on commit 75ff57c

Please sign in to comment.