Skip to content

Commit

Permalink
Merge branch 'master' into 3239-st-d-within-in-subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Auke Booij authored May 5, 2020
2 parents 78ef893 + 1211c23 commit 49f5dd7
Show file tree
Hide file tree
Showing 61 changed files with 888 additions and 412 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Read more about the session argument for computed fields in the [docs](https://h
(Add entries here in the order of: server, console, cli, docs, others)

- server: fix mishandling of GeoJSON inputs in subscriptions (fix #3239)

- console: add read replica support section to pro popup (#4118)
- cli: list all avialable commands in root command help (fix #4623)

## `v1.2.0`

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Hasura GraphQL Engine

[![Docs](https://img.shields.io/badge/docs-v1.0-brightgreen.svg?style=flat)](https://hasura.io/docs)
[![Latest release](https://img.shields.io/github/v/release/hasura/graphql-engine)](https://github.com/hasura/graphql-engine/releases/latest)
[![Docs](https://img.shields.io/badge/docs-v1.x-brightgreen.svg?style=flat)](https://hasura.io/docs)
[![CircleCI](https://circleci.com/gh/hasura/graphql-engine.svg?style=shield)](https://circleci.com/gh/hasura/graphql-engine)


Expand Down
4 changes: 4 additions & 0 deletions cli/commands/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ func (o *helpOptions) run() {
NewMigrateCmd(o.EC),
NewMetadataCmd(o.EC),
NewConsoleCmd(o.EC),
NewActionsCmd(o.EC),
},
},
{
Title: "Other commands",
Commands: []*cobra.Command{
NewCompletionCmd(o.EC),
NewVersionCmd(o.EC),
NewPluginsCmd(o.EC),
NewScriptsCmd(o.EC),
NewUpdateCLICmd(o.EC),
},
},
}
Expand Down
899 changes: 651 additions & 248 deletions console/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"valid-url": "1.0.9"
},
"devDependencies": {
"@babel/core": "7.8.7",
"@babel/core": "7.9.0",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-decorators": "7.8.3",
"@babel/plugin-proposal-do-expressions": "7.8.3",
Expand All @@ -136,7 +136,7 @@
"@babel/plugin-proposal-throw-expressions": "7.8.3",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-import-meta": "7.8.3",
"@babel/preset-env": "7.8.7",
"@babel/preset-env": "7.9.5",
"@babel/preset-react": "7.8.3",
"@babel/preset-typescript": "7.8.3",
"@babel/register": "7.8.6",
Expand Down
1 change: 0 additions & 1 deletion console/src/components/Common/TableCommon/Table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ a.expanded {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}

.bulkDeleteButton {
Expand Down
17 changes: 16 additions & 1 deletion console/src/components/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ class Main extends React.Component {
const rate = require('./images/rate.svg');
const regression = require('./images/regression.svg');
const management = require('./images/management.svg');
const allow = require('./images/allow.svg');
const allow = require('./images/allow-listing.svg');
const read = require('./images/read-replica.svg');

const arrowForwardRed = require('./images/arrow_forward-red.svg');
const currentLocation = location.pathname;
const currentActiveBlock = getPathRoot(currentLocation);
Expand Down Expand Up @@ -614,6 +616,19 @@ class Main extends React.Component {
</div>
</div>
</div>
<div className={styles.proFeaturesList}>
<div className={styles.featuresImg}>
<img src={read} alt={'read'} />
</div>
<div className={styles.featuresList}>
<div className={styles.featuresTitle}>
Read Replicas
</div>
<div className={styles.featuresDescription}>
Native Read Replica support for enhanced performance and scalability
</div>
</div>
</div>
</div>
<div className={styles.popUpFooter}>
<a
Expand Down
8 changes: 6 additions & 2 deletions console/src/components/Main/Main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,10 @@
display: flex;
.featuresImg {
padding-right: 14px;
img {
max-width: 24px;
min-width: 24px;
}
}
.featuresList {
.featuresTitle {
Expand Down Expand Up @@ -1336,7 +1340,7 @@
}

.helpSection {
font-size: 12px;
font-size: 12px;
}

.proWrapper{
Expand All @@ -1351,4 +1355,4 @@
}
}

}
}
17 changes: 17 additions & 0 deletions console/src/components/Main/images/allow-listing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions console/src/components/Main/images/read-replica.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/graphql/manual/actions/action-connect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You can create relationships for custom output types by:

Set the output type relationship as shown below:

.. thumbnail:: ../../../img/graphql/manual/actions/actions-relationship.png
.. thumbnail:: /img/graphql/manual/actions/actions-relationship.png
:alt: Console action relationship

Hit ``Save`` to create the relationship.
Expand Down
4 changes: 3 additions & 1 deletion docs/graphql/manual/actions/action-handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ Hasura will call the handler with the following payload:
.. code-block:: json
{
"action": "UserLogin",
"action": {
"name": "UserLogin"
},
"input": {
"username": "jake",
"password": "secretpassword"
Expand Down
2 changes: 1 addition & 1 deletion docs/graphql/manual/actions/action-permissions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Set action permissions
Head to the ``Actions -> [action-name] -> Permissions`` tab in the
console.

.. thumbnail:: ../../../img/graphql/manual/actions/actions-permissions.png
.. thumbnail:: /img/graphql/manual/actions/actions-permissions.png
:alt: Console action permission

Hit ``Save`` to give the role permission to access the action.
Expand Down
8 changes: 4 additions & 4 deletions docs/graphql/manual/actions/codegen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Generating handler code for your action
You can select the framework of your choice to get the corresponding
handler boilerplate code.

.. thumbnail:: ../../../img/graphql/manual/actions/console-codegen-tab.png
.. thumbnail:: /img/graphql/manual/actions/console-codegen-tab.png
:alt: Console codegen tab


Expand All @@ -59,17 +59,17 @@ Generating handler code for your action
1. Choose which framework you want to codegen for:

.. thumbnail:: ../../../img/graphql/manual/actions/cli-framework-prompt.png
.. thumbnail:: /img/graphql/manual/actions/cli-framework-prompt.png
:alt: CLI Framework Prompt

2. Choose if you also wish to clone a starter kit for the chosen framework:

.. thumbnail:: ../../../img/graphql/manual/actions/cli-starter-kit-prompt.png
.. thumbnail:: /img/graphql/manual/actions/cli-starter-kit-prompt.png
:alt: CLI Starter Kit Prompt

3. Choose a path where you want to output the auto-generated code files

.. thumbnail:: ../../../img/graphql/manual/actions/cli-output-dir-prompt.png
.. thumbnail:: /img/graphql/manual/actions/cli-output-dir-prompt.png
:alt: CLI Starter Kit Prompt


Expand Down
4 changes: 2 additions & 2 deletions docs/graphql/manual/actions/create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ in the GraphQL schema.
Go to the ``Actions`` tab on the console and click on ``Create``. This will
take you to a page like this:

.. thumbnail:: ../../../img/graphql/manual/actions/mutation-action-create.png
.. thumbnail:: /img/graphql/manual/actions/mutation-action-create.png
:alt: Console action create
:width: 70%

Expand Down Expand Up @@ -270,7 +270,7 @@ the GraphQL schema.
Go to the ``Actions`` tab on the console and click on ``Create``. This will
take you to a page like this:

.. thumbnail:: ../../../img/graphql/manual/actions/query-action-create.png
.. thumbnail:: /img/graphql/manual/actions/query-action-create.png
:alt: Console action create
:width: 70%

Expand Down
6 changes: 3 additions & 3 deletions docs/graphql/manual/actions/derive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ derive our action:

Next hit the ``Derive action`` button as shown below:

.. thumbnail:: ../../../img/graphql/manual/actions/actions-derive-button.png
.. thumbnail:: /img/graphql/manual/actions/actions-derive-button.png
:alt: Console derive action button

This will redirect you to the ``Add a new action`` page with the action
definition auto filled.

.. thumbnail:: ../../../img/graphql/manual/actions/actions-derive-types.png
.. thumbnail:: /img/graphql/manual/actions/actions-derive-types.png
:alt: Console derived action types


Expand Down Expand Up @@ -149,7 +149,7 @@ the action back to the original operation.
You can select the framework of your choice to get the corresponding
handler boilerplate code.

.. thumbnail:: ../../../img/graphql/manual/actions/actions-derive-codegen.png
.. thumbnail:: /img/graphql/manual/actions/actions-derive-codegen.png
:alt: Console derived action codegen

.. note::
Expand Down
2 changes: 1 addition & 1 deletion docs/graphql/manual/actions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ logic using custom queries and mutations. Actions can be
added to Hasura to handle various use cases such as data validation, data
enrichment from external sources and any other complex business logic.

.. thumbnail:: ../../../img/graphql/manual/actions/actions-arch.png
.. thumbnail:: /img/graphql/manual/actions/actions-arch.png
:class: no-shadow
:alt: Actions high level architecture

Expand Down
4 changes: 2 additions & 2 deletions docs/graphql/manual/auth/authentication/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rules.

Here's how a GraphQL request is processed in webhook mode:

.. thumbnail:: ../../../../img/graphql/manual/auth/auth-webhook-overview.png
.. thumbnail:: /img/graphql/manual/auth/auth-webhook-overview.png
:alt: Authentication using webhooks

2. JWT (JSON Web Token)
Expand All @@ -51,7 +51,7 @@ evaluate access control rules.

Here's how a GraphQL query is processed in JWT mode:

.. thumbnail:: ../../../../img/graphql/manual/auth/auth-jwt-overview.png
.. thumbnail:: /img/graphql/manual/auth/auth-jwt-overview.png
:alt: Authentication using JWT

**See more details at:**
Expand Down
4 changes: 2 additions & 2 deletions docs/graphql/manual/auth/authentication/jwt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The idea is that your auth server will return JWT tokens, which are decoded and
verified by the GraphQL engine, to authorize and get metadata about the request
(``x-hasura-*`` values).

.. thumbnail:: ../../../../img/graphql/manual/auth/jwt-auth.png
.. thumbnail:: /img/graphql/manual/auth/jwt-auth.png
:alt: Authentication using JWT

The JWT is decoded, the signature is verified, then it is asserted that the
Expand Down Expand Up @@ -543,7 +543,7 @@ https://hasura.io/jwt-config.
The config generated from this page can be directly pasted in yaml files and command line arguments as it takes
care of escaping new lines.

.. thumbnail:: ../../../../img/graphql/manual/auth/jwt-config-generated.png
.. thumbnail:: /img/graphql/manual/auth/jwt-config-generated.png
:width: 75%
:alt: Generating JWT config

Expand Down
2 changes: 1 addition & 1 deletion docs/graphql/manual/auth/authentication/webhook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Introduction

You can configure the GraphQL engine to use a webhook to authenticate all incoming requests to the Hasura GraphQL engine server.

.. thumbnail:: ../../../../img/graphql/manual/auth/webhook-auth.png
.. thumbnail:: /img/graphql/manual/auth/webhook-auth.png
:alt: Authentication using webhooks

.. admonition:: Prerequisite
Expand Down
8 changes: 4 additions & 4 deletions docs/graphql/manual/auth/authorization/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Introduction

To understand the basics of access control in Hasura, let's take a look at this analogy to a SQL query:

.. thumbnail:: ../../../../img/graphql/manual/auth/permissions-rule-analogy.png
.. thumbnail:: /img/graphql/manual/auth/permissions-rule-analogy.png
:width: 70%
:alt: Understanding access control in Hasura

Expand Down Expand Up @@ -80,7 +80,7 @@ Head to the ``GraphiQL`` tab in your console and try out the below query:
You'll see that this results in a response that contains all the authors because by default the GraphQL
query is accepted with **admin** permissions.

.. thumbnail:: ../../../../img/graphql/manual/auth/fetch-authors.png
.. thumbnail:: /img/graphql/manual/auth/fetch-authors.png
:alt: Run a query without access control

Define access control rules
Expand All @@ -90,7 +90,7 @@ Now let's define an access control rule for the ``author`` table for a role ``us
**Permissions** section of the table (``Data`` --> <table> --> ``Permissions`` tab) and define permissions
as shown below:

.. thumbnail:: ../../../../img/graphql/manual/auth/permission-basics-simple-example.png
.. thumbnail:: /img/graphql/manual/auth/permission-basics-simple-example.png
:alt: Define access control rules

This permission rule reads as: "*For the role* ``user`` *, table* ``author`` *and operation* ``select``/``query``,
Expand All @@ -103,7 +103,7 @@ Let's run the same query as above but now with the ``X-Hasura-Role`` and ``X-Has
variables also included to indicate role and user information. These session variables are passed in
the ``Request Headers`` section of ``GraphiQL`` as highlighted below:

.. thumbnail:: ../../../../img/graphql/manual/auth/permission-basics-query-with-access-control.png
.. thumbnail:: /img/graphql/manual/auth/permission-basics-query-with-access-control.png
:alt: Run a query with access control

As you can see, the results are now filtered based on the access control rule for the role ``user``
Expand Down
Loading

0 comments on commit 49f5dd7

Please sign in to comment.