Skip to content

Commit

Permalink
Merge branch 'master' into console-data-sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandra Sikora committed Aug 26, 2020
2 parents f294195 + 10a5579 commit 0bf4565
Show file tree
Hide file tree
Showing 504 changed files with 1,928 additions and 257 deletions.
2 changes: 1 addition & 1 deletion console/src/components/Services/Data/Schema/Schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ class Schema extends Component {
className={styles.add_mar_top}
key={'non-trackable-custom-functions'}
>
<CollapsibleToggle title={heading} isOpen>
<CollapsibleToggle title={heading}>
<div className={`${styles.padd_left_remove} col-xs-12`}>
{getNonTrackableFuncList()}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ class RelationshipEditor extends React.Component {
<div className={styles.display_flex}>
{getEditBtn()}
<b className={styles.textNoNewLine}>{relName}</b>
<GqlCompatibilityWarning
identifier={relName}
className={styles.add_mar_left_small}
/>
</div>
<GqlCompatibilityWarning
identifier={relName}
className={styles.add_mar_left_small}
/>
<div className={tableStyles.relationshipTopPadding}>
<p className={styles.textNoNewLine}>{getRelDef(relConfig)}</p>
</div>
Expand Down
2 changes: 2 additions & 0 deletions docs/404.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. title:: 404 - Page Not Found

:orphan:

404 - Page Not Found
---------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/_static/scripts/hdocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ window.hdocs = (function () {

docsearch({
appId: 'WCBB1VVLRC',
apiKey: '298d448cd9d7ed93fbab395658da19e8',
indexName: 'graphql-docs-prod',
apiKey: HDOCS_ALGOLIA_API_KEY,
indexName: HDOCS_ALGOLIA_INDEX,
inputSelector: '#search_element',
transformData: hdocs.transformSearchData,
debug: false
Expand Down
6 changes: 4 additions & 2 deletions docs/_static/styles/landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
}

.body_content {
font-family: 'Gudea';
font-size: 15px;
color: #333;
}

.small_content {
font-family: 'Gudea';
font-size: 14px;
color: #333;
}
Expand Down Expand Up @@ -101,6 +99,10 @@
padding-bottom: 0;
}

.description {
margin-bottom: 20px;
}

.text_left {
text-align: left;
}
Expand Down
4 changes: 4 additions & 0 deletions docs/_static/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,10 @@ article ol ol {
margin: 15px;
}

.sphinxsidebarwrapper > ul:not(.current) {
display: none;
}

#sidebar {
background-color: #001934;
width: 24% !important;
Expand Down
20 changes: 16 additions & 4 deletions docs/_theme/djangodocs/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
{% set is_landing_page = true %}
{%- endif %}

{%- if pagename.startswith('graphql/core') %}
{% set is_core = true %}
{% set ALGOLIA_INDEX = 'graphql-docs-prod' %}
{% set ALGOLIA_API_KEY = '298d448cd9d7ed93fbab395658da19e8' %}
{%- elif pagename.startswith('graphql/cloud') %}
{% set is_cloud = true %}
{% set ALGOLIA_INDEX = 'cloud-docs-prod' %}
{% set ALGOLIA_API_KEY = 'cf84f05a225bedb72ce472dada63d29f' %}
{%- endif %}

{% set css_files = css_files + ['_static/graphiql/graphiql.css', '_static/styles/main.css'] %}

{%- if is_landing_page %}
Expand Down Expand Up @@ -105,7 +115,7 @@
</a>
</li>
<li>
<a href='https://hasura.io/docs/1.0/graphql/manual/getting-started/index.html'>
<a href='https://hasura.io/docs/1.0/graphql/core/getting-started/index.html'>
<button class="commonBtn navBtnHome">
Get Started
</button>
Expand Down Expand Up @@ -162,7 +172,7 @@
</a>
</li>
<li>
<a class="menuLink" href='https://hasura.io/docs/1.0/graphql/manual/getting-started/index.html'>
<a class="menuLink" href='https://hasura.io/docs/1.0/graphql/core/getting-started/index.html'>
<button class='commonBtn navBtnHome'>
Get Started
</button>
Expand All @@ -187,12 +197,12 @@
<img src="{{ pathto('_images/layout/close-icon.svg', 1) }}" alt="Close"/>
</div>
<div class="tabbarContainerWrapper blueBgColor boderBottom">
<a href="" class="tabbarTabActive">
<a href="{{ pathto('graphql/core/index.html', 1) }}" {%- if is_core %} class="tabbarTabActive" {%- endif %}>
<span>
Hasura Core
</span>
</a>
<a href="https://hasura.io/docs/cloud/1.0/manual/index.html">
<a href="{{ pathto('graphql/cloud/index.html', 1) }}" {%- if is_cloud %} class="tabbarTabActive" {%- endif %}>
<span>
Hasura Cloud
</span>
Expand Down Expand Up @@ -344,6 +354,8 @@
<script type="text/javascript">
const HDOCS_BASE_DOMAIN = "{{ BASE_DOMAIN }}";
const HDOCS_GRAPHIQL_DEFAULT_ENDPOINT = "{{ GRAPHIQL_DEFAULT_ENDPOINT }}";
const HDOCS_ALGOLIA_INDEX = "{{ALGOLIA_INDEX}}";
const HDOCS_ALGOLIA_API_KEY = "{{ALGOLIA_API_KEY}}";

document.addEventListener('DOMContentLoaded', function () {
hdocs && hdocs.setup();
Expand Down
21 changes: 0 additions & 21 deletions docs/_theme/djangodocs/localtoc.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
{%- if display_toc %}
<!--
<div class="header_main_logo inline-block mobile-hide">
<a href="https://{{ BASE_DOMAIN }}/" target="_blank" rel="noopener">
<div class="img_wrapper inline-block">
<img class="responsive logo_img" src="{{ pathto('_images/layout/logo-lite.svg', 1) }}" alt="Hasura Logo Light" />
</div>
</a>
<a class="docs_label" href="{{ pathto('', 1) }}">
<div class="inline-block hero"> docs </div>
</a>
<a class="version_txt">
<select value="{{ version }}" onchange="location = this.value;" class="selected" aria-label="Select Version">
{%- if version == '1.0' %}
<option class="option_val" value="https://{{ BASE_DOMAIN }}/docs/1.0/graphql/manual/index.html" selected="selected">v1.x</option>
{%- else -%}
<option class="option_val" value="https://{{ BASE_DOMAIN }}/docs/1.0/graphql/manual/index.html">v1.x</option>
{% endif %}
</select>
</a>
</div>
-->
{{ toc_full }}
{%- endif %}
32 changes: 15 additions & 17 deletions docs/_theme/djangodocs/pages/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@
<div class="box_head_wrapper">
<div class="box_head">
<img src="{{ pathto('_images/landing/graphql.svg', 1) }}" alt="GraphQL engine"/>
<h3 class="head_wrapper">1. The Hasura GraphQL engine</h3>
<h3 class="head_wrapper">Hasura docs</h3>
</div>
<div class="view_all_wrapper small_content">
</div>
</div>
<div class="small_content space_wrapper text_left">
This guide covers all Hasura GraphQL engine concepts and features.
<br/> <br/>
</div>
<div class="sign_in_wrapper space_wrapper">
<div class="get_start">
<img src="{{ pathto('_images/landing/manual.svg', 1) }}" alt="Manual"/>
</div>
<a href="{{ pathto('graphql/manual/index.html', 1) }}">
<div class="docs_link body_content">
Open manual
<img src="{{ pathto('_images/landing/right-arrow.svg', 1) }}" alt="Right Arrow" />
</div>
</a>
<div class="space_wrapper text_left">
<p class="description">This guide covers all Hasura concepts and features.</p>
<ul>
<li>
<a class="docs_link" href="{{ pathto('graphql/core/index.html', 1) }}">
Core docs
</a>
</li>
<li>
<a class="docs_link" href="{{ pathto('graphql/cloud/index.html', 1) }}">
Cloud docs
</a>
</li>
</ul>
</div>
</div>
</div>
Expand Down
34 changes: 34 additions & 0 deletions docs/graphql/cloud/allow-lists.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. meta::
:description: Hasura Cloud allow lists
:keywords: hasura, docs, cloud, security, allow

.. _allow_lists:

Allow lists
===========

.. contents:: Table of contents
:backlinks: none
:depth: 1
:local:

Introduction
------------

You can specify a list of safe operations (GraphQL queries, mutations or subscriptions) for your project. This list restricts your project's GraphQL Engine to execute only queries that are present in the list.

Manage the allow list
---------------------

The manager view offers inspection, export, or removal of operations in the allow list:

.. thumbnail:: /img/graphql/cloud/security/pro-tabs-allowlist.png
:alt: Hasura Cloud Console allow list tab

Quick-create allowed operations
-------------------------------

This Pro feature lets you add to the allow list with one click from the record of past operations. (With Core, allow lists must be :ref:`managed manually <allow_list>`.)

.. thumbnail:: /img/graphql/cloud/security/allowlist-add-new-op.png
:alt: Hasura Cloud Console create new allowed operation
49 changes: 49 additions & 0 deletions docs/graphql/cloud/api-limits.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.. meta::
:description: Hasura Cloud API limits
:keywords: hasura, docs, cloud, security, limits

.. _api_limits:

API limits
==========

.. contents:: Table of contents
:backlinks: none
:depth: 1
:local:

Introduction
------------

Limiting the depth and/or rate of API requests can help prevent API performance issues caused by malicious or poorly implemented queries.

Configuring an API limit
------------------------

**Rate limits**
Restricts number of GraphQL operations per minute. This uses a sliding window approach. This means whenever Hasura Pro receives a request, it will count the rate of that client starting from the current time to last one minute.

**Depth limits**
Restricts a GraphQL operation based on its depth, preventing deeply nested queries.

API limits are defined by **role** (anonymous, user) and can restrict request rate, depth, or both. Unique request parameters can include IP address or session variables (*x-hasura-user-id*, *x-hasura-org-id*, etc.)

Manage API limits
-----------------

API limits can have a *global* or *per role* configuration. If an incoming request does not contain a valid role then the global limit is applied.

.. thumbnail:: /img/graphql/cloud/security/pro-tab-apilimits.png
:alt: Hasura Cloud Console api limit tab

.. admonition:: Admin & IntrospectionQuery exemptions

All API limits are **not** applied for the admin role, and depth limits are **NOT** applied to introspection queries

Quick-create limits
-------------------

Hasura Cloud lets you add limits with one click from the list of past operations.

.. thumbnail:: /img/graphql/cloud/security/pro-tab-apilimit-config.png
:alt: Hasura Cloud Console create new api limit
Loading

0 comments on commit 0bf4565

Please sign in to comment.