mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
docs: sidebar grouping
[DOCS-1023]: https://hasurahq.atlassian.net/browse/DOCS-1023?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9427 GitOrigin-RevId: afe1325ce28f4432bbba98b48016da0e7b90d733
This commit is contained in:
parent
eefa345bf8
commit
60ba0566db
5
docs/docs/_heading_auth.mdx
Normal file
5
docs/docs/_heading_auth.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 40
|
||||
sidebar_label: 'Auth'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_basics.mdx
Normal file
5
docs/docs/_heading_basics.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
sidebar_label: 'Basics'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_ci_cd.mdx
Normal file
5
docs/docs/_heading_ci_cd.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 80
|
||||
sidebar_label: 'CI/CD'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_data_api.mdx
Normal file
5
docs/docs/_heading_data_api.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 30
|
||||
sidebar_label: 'The Data API'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_data_sources.mdx
Normal file
5
docs/docs/_heading_data_sources.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 20
|
||||
sidebar_label: 'Data Sources'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_deployment.mdx
Normal file
5
docs/docs/_heading_deployment.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 70
|
||||
sidebar_label: 'Deployment'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_materials.mdx
Normal file
5
docs/docs/_heading_materials.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 100
|
||||
sidebar_label: 'Materials'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_perf_and_monitoring.mdx
Normal file
5
docs/docs/_heading_perf_and_monitoring.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 60
|
||||
sidebar_label: 'Security & Observability'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_products.mdx
Normal file
5
docs/docs/_heading_products.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 90
|
||||
sidebar_label: 'Products'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
5
docs/docs/_heading_trigger_based_logic.mdx
Normal file
5
docs/docs/_heading_trigger_based_logic.mdx
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 50
|
||||
sidebar_label: 'Trigger-based Logic'
|
||||
sidebar_class_name: sidebar_heading
|
||||
---
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Actions",
|
||||
"position": 80
|
||||
"position": 22
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "API reference",
|
||||
"position": 170
|
||||
"position": 37
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "Authentication & Authorization",
|
||||
"position": 70,
|
||||
"position": 41,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "auth"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "Caching",
|
||||
"position": 70,
|
||||
"position": 36,
|
||||
"className": "cloud-and-enterprise-icon"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "GraphQL Federation",
|
||||
"position": 100,
|
||||
"position": 24,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "data-federation"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Databases",
|
||||
"position": 20
|
||||
"position": 21
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Deployment",
|
||||
"position": 130
|
||||
"position": 71
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "Hasura Enterprise",
|
||||
"position": 210,
|
||||
"position": 92,
|
||||
"className": "enterprise-icon",
|
||||
"customProps": {
|
||||
"sidebar_pathname": "enterprise"
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Event Triggers",
|
||||
"position": 110
|
||||
"position": 51
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ keywords:
|
||||
- hasura
|
||||
- docs
|
||||
- FAQs
|
||||
sidebar_position: 260
|
||||
sidebar_position: 105
|
||||
sidebar_label: FAQs
|
||||
# adding index slug in case this root doc becomes a directory later
|
||||
slug: faq/index
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Getting Started",
|
||||
"position": 10
|
||||
"position": 12
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ keywords:
|
||||
- hasura
|
||||
- docs
|
||||
- Glossary
|
||||
sidebar_position: 270
|
||||
sidebar_position: 106
|
||||
# adding index slug in case this root doc becomes a directory later
|
||||
slug: glossary/index
|
||||
---
|
||||
@ -17,36 +17,34 @@ import Glossary from '@site/static/icons/features/glossary.svg';
|
||||
|
||||
## Docker
|
||||
|
||||
Docker is a system which allows the packaging up of code and all its dependencies so the an application runs
|
||||
quickly and reliably from one computing environment to another.
|
||||
Docker is a system which allows the packaging up of code and all its dependencies so the an application runs quickly and
|
||||
reliably from one computing environment to another.
|
||||
|
||||
## Docker container
|
||||
|
||||
A Docker container image is a lightweight, standalone, executable package of software that includes everything
|
||||
needed to run an application: code, runtime, system tools, system libraries and settings. Hasura can be run as a
|
||||
Docker container.
|
||||
A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to
|
||||
run an application: code, runtime, system tools, system libraries and settings. Hasura can be run as a Docker container.
|
||||
|
||||
## Docker image
|
||||
|
||||
Docker images become containers at runtime and in the case of Docker containers – images become containers
|
||||
when they run on Docker Engine which is available for both Linux and Windows-based applications, containerized
|
||||
software will always run the same, regardless of the infrastructure. Containers isolate software from its
|
||||
environment and ensure that it works uniformly despite differences for instance between development and staging.
|
||||
Hasura is distributed as a Docker image for the Community Edition at
|
||||
[DockerHub](https://hub.docker.com/r/hasura/graphql-engine).
|
||||
Docker images become containers at runtime and in the case of Docker containers – images become containers when they run
|
||||
on Docker Engine which is available for both Linux and Windows-based applications, containerized software will always
|
||||
run the same, regardless of the infrastructure. Containers isolate software from its environment and ensure that it
|
||||
works uniformly despite differences for instance between development and staging. Hasura is distributed as a Docker
|
||||
image for the Community Edition at [DockerHub](https://hub.docker.com/r/hasura/graphql-engine).
|
||||
|
||||
## GraphQL schema
|
||||
|
||||
Every GraphQL service defines a set of types which completely describe the set of possible data you can query on
|
||||
that service. This is called the GraphQL schema. Hasura automatically generates a GraphQL Schema for you from the
|
||||
tables in your connected databases, Hasura Actions you've defined, and other connected GraphQL or REST endpoints.
|
||||
When queries come in, they are validated and executed against that schema.
|
||||
Every GraphQL service defines a set of types which completely describe the set of possible data you can query on that
|
||||
service. This is called the GraphQL schema. Hasura automatically generates a GraphQL Schema for you from the tables in
|
||||
your connected databases, Hasura Actions you've defined, and other connected GraphQL or REST endpoints. When queries
|
||||
come in, they are validated and executed against that schema.
|
||||
|
||||
## GraphQL query type
|
||||
|
||||
Every GraphQL service has a `query` type and may or may not have a mutation type. These types are the same as a
|
||||
regular object type, but they are special because they define the entry point of every GraphQL query. In Hasura the
|
||||
query type is generated for you in order to get data from your schema.
|
||||
Every GraphQL service has a `query` type and may or may not have a mutation type. These types are the same as a regular
|
||||
object type, but they are special because they define the entry point of every GraphQL query. In Hasura the query type
|
||||
is generated for you in order to get data from your schema.
|
||||
|
||||
[//]: # 'TODO query types per table'
|
||||
|
||||
@ -85,15 +83,15 @@ security and deployment features which aren't available in Hasura Community Edit
|
||||
## Hasura Cloud IP
|
||||
|
||||
A Hasura Cloud IP will be listed on the Hasura Cloud Dashboard for each project. Hasura will be connecting to your
|
||||
database from this IP address. If your database is not exposed to the internet, you must allow connections from this
|
||||
IP address on your firewall settings for Hasura Cloud Project to function properly. Otherwise, Hasura will not be
|
||||
able to connect to your database and the GraphQL API will not be available.
|
||||
database from this IP address. If your database is not exposed to the internet, you must allow connections from this IP
|
||||
address on your firewall settings for Hasura Cloud Project to function properly. Otherwise, Hasura will not be able to
|
||||
connect to your database and the GraphQL API will not be available.
|
||||
|
||||
## Hasura Cloud Project
|
||||
|
||||
A Project is an individual GraphQL API hosted by Hasura Cloud. You can create a Project by going to the Hasura Cloud
|
||||
dashboard and then connecting a database from the Hasura Console. You can also provision a database on cloud
|
||||
platforms like Heroku from the Hasura Console itself.
|
||||
dashboard and then connecting a database from the Hasura Console. You can also provision a database on cloud platforms
|
||||
like Heroku from the Hasura Console itself.
|
||||
|
||||
Each project is allocated a unique auto-generated name and an ID. You can use this name or ID while communicating to
|
||||
Hasura team regarding this project. Each project is also assigned a GraphQL API endpoint of the format
|
||||
@ -105,14 +103,14 @@ For example, a project might be called `usable-cobra-29` with ID `bf0ea856-76a2-
|
||||
|
||||
When you open the Hasura Console on a Cloud Project, you will not be asked to enter the admin secret like Hasura
|
||||
Community Edition version. Instead, if you are an admin, the Console will be accessible with the admin secret already
|
||||
set, or if you are a collaborator with limited access you will be automatically logged into the Console via an
|
||||
OAuth2.0 based authorization flow. You will be given the right access based on your permissions for the particular
|
||||
Hasura Cloud Project.
|
||||
set, or if you are a collaborator with limited access you will be automatically logged into the Console via an OAuth2.0
|
||||
based authorization flow. You will be given the right access based on your permissions for the particular Hasura Cloud
|
||||
Project.
|
||||
|
||||
After the login process is complete, you'll see a new header called `Hasura-Collaborator-Token` in the "Request
|
||||
Headers" section of GraphiQL. This token is used instead of admin secret to authenticate and authorize all the
|
||||
requests made from the Console. The token is only valid for 5mins and is refreshed silently by the Console. It is to
|
||||
be used only from Console.
|
||||
After the login process is complete, you'll see a new header called `Hasura-Collaborator-Token` in the "Request Headers"
|
||||
section of GraphiQL. This token is used instead of admin secret to authenticate and authorize all the requests made from
|
||||
the Console. The token is only valid for 5mins and is refreshed silently by the Console. It is to be used only from
|
||||
Console.
|
||||
|
||||
For accessing the API from other clients, use the admin secret or create a Personal Access Token.
|
||||
|
||||
@ -122,9 +120,9 @@ A self-hosted version of Hasura that includes enterprise specific features for o
|
||||
|
||||
## Lux _or_ Control Plane (Enterprise Edition)
|
||||
|
||||
A set of services that powers the Hasura Enterprise Edition Control Plane that allows for user/team management,
|
||||
managing Hasura GraphQL configuration and includes a monitoring plane that ingests Hasura & GraphQL API metrics and
|
||||
makes it available over a UI and an API.
|
||||
A set of services that powers the Hasura Enterprise Edition Control Plane that allows for user/team management, managing
|
||||
Hasura GraphQL configuration and includes a monitoring plane that ingests Hasura & GraphQL API metrics and makes it
|
||||
available over a UI and an API.
|
||||
|
||||
## Rolling Deployment
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Hasura CLI",
|
||||
"position": 180
|
||||
"position": 81
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "Hasura Cloud",
|
||||
"position": 200,
|
||||
"position": 91,
|
||||
"className": "cloud-icon"
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ keywords:
|
||||
- graphQL
|
||||
- graphiQL
|
||||
sidebar_label: GraphQL API Explorer
|
||||
sidebar_position: 240
|
||||
sidebar_position: 90
|
||||
sidebar_class_name: cloud-icon
|
||||
# adding index slug in case this root doc becomes a directory later
|
||||
slug: graphql-api-explorer/index
|
@ -129,7 +129,7 @@ import Cloud from '@site/static/icons/features/cloud.svg';
|
||||
<VersionedLink to="/event-triggers/overview/">Event Triggers and Scheduled Triggers</VersionedLink>
|
||||
</li>
|
||||
<li>
|
||||
<VersionedLink to="/graphql-api-explorer/index/">GraphiQL query and mutation designer</VersionedLink>
|
||||
<VersionedLink to="/hasura-cloud/graphql-api-explorer/index/">GraphiQL query and mutation designer</VersionedLink>
|
||||
</li>
|
||||
<li>
|
||||
<VersionedLink to="/hasura-cli/overview/">CLI</VersionedLink>
|
||||
|
@ -8,7 +8,7 @@ keywords:
|
||||
- graphql engine
|
||||
slug: index
|
||||
sidebar_label: Introduction
|
||||
sidebar_position: 0
|
||||
sidebar_position: 11
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "Migrations, Metadata and Seeds",
|
||||
"position": 140,
|
||||
"position": 82,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "migrations-metadata-seeds"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Mutations",
|
||||
"position": 50
|
||||
"position": 33
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "Observability",
|
||||
"position": 150,
|
||||
"position": 63,
|
||||
"className": "cloud-icon"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "Hasura Policies",
|
||||
"position": 220,
|
||||
"position": 103,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "policies"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Queries",
|
||||
"position": 40
|
||||
"position": 32
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Remote Schemas",
|
||||
"position": 90
|
||||
"position": 23
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Resources",
|
||||
"position": 230
|
||||
"position": 102
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "RESTified Endpoints",
|
||||
"position": 125,
|
||||
"position": 35,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "restified"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Scheduled Triggers",
|
||||
"position": 120
|
||||
"position": 52
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "GraphQL Schema",
|
||||
"position": 30,
|
||||
"position": 31,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "schema"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"label": "Security Tools",
|
||||
"position": 160,
|
||||
"position": 62,
|
||||
"customProps": {
|
||||
"sidebar_pathname": "security"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Subscriptions",
|
||||
"position": 60
|
||||
"position": 34
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
sidebar_label: Troubleshooting
|
||||
sidebar_position: 250
|
||||
sidebar_position: 104
|
||||
description: Troubleshoot Hasura GraphQL Engine errors
|
||||
title: Troubleshooting Hasura GraphQL Engine errors
|
||||
keywords:
|
||||
|
@ -5,6 +5,7 @@ import GraphQLWithHasuraBanner from '@site/src/components/GraphQLWithHasuraBanne
|
||||
import CustomFooter from '@site/src/components/CustomFooter';
|
||||
import styles from './styles.module.scss';
|
||||
import { ScrollToFeedbackButton } from '@site/src/components/Feedback/ScrollToFeedbackButton';
|
||||
import { Redirect } from '@docusaurus/router';
|
||||
|
||||
const CustomDocItem = props => {
|
||||
useEffect(() => {
|
||||
@ -26,6 +27,12 @@ const CustomDocItem = props => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
// redirect them to the index if they attempt to directly navigate to a path with
|
||||
// _heading_ in it
|
||||
if (props.location.pathname.includes('_heading_')) {
|
||||
return <Redirect to="/docs/latest/index/" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={
|
||||
|
@ -69,6 +69,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.theme-doc-sidebar-item-link {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Dark Mode Styles */
|
||||
|
||||
html[data-theme='dark'] {
|
||||
|
@ -35,7 +35,7 @@
|
||||
.theme-doc-sidebar-menu {
|
||||
.theme-doc-sidebar-item-category {
|
||||
.theme-doc-sidebar-item-link {
|
||||
margin-top: 0;
|
||||
margin-top: 2px;
|
||||
|
||||
.menu__link {
|
||||
//border-left: 0.1rem solid var(--color-gray-16);
|
||||
@ -105,6 +105,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.theme-doc-sidebar-item-category-level-1 {
|
||||
margin-top: 1px !important;
|
||||
}
|
||||
|
||||
.sidebar_heading {
|
||||
font-size: 0.9rem !important;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0 !important;
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
|
||||
.theme-doc-sidebar-item-link {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
/* Dark Mode Styles */
|
||||
|
||||
html[data-theme='dark'] {
|
||||
|
@ -43,32 +43,50 @@ export default function DocSidebarItemLink({ item, onItemClick, activePath, leve
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<li
|
||||
className={clsx(
|
||||
ThemeClassNames.docs.docSidebarItemLink,
|
||||
ThemeClassNames.docs.docSidebarItemLinkLevel(level),
|
||||
'menu__list-item',
|
||||
className,
|
||||
styles[`sidebar_link_wrapper`]
|
||||
)}
|
||||
key={label}
|
||||
>
|
||||
<Link
|
||||
className={clsx('menu__link', !isInternalLink && styles.menuExternalLink, {
|
||||
'menu__link--active': isActive,
|
||||
})}
|
||||
autoAddBaseUrl={autoAddBaseUrl}
|
||||
aria-current={isActive ? 'page' : undefined}
|
||||
to={href}
|
||||
{...(isInternalLink && {
|
||||
onClick: onItemClick ? () => onItemClick(item) : undefined,
|
||||
})}
|
||||
{...props}
|
||||
if (className != 'sidebar_heading') {
|
||||
return (
|
||||
<li
|
||||
className={clsx(
|
||||
ThemeClassNames.docs.docSidebarItemLink,
|
||||
ThemeClassNames.docs.docSidebarItemLinkLevel(level),
|
||||
'menu__list-item',
|
||||
className,
|
||||
styles[`sidebar_link_wrapper`]
|
||||
)}
|
||||
key={label}
|
||||
>
|
||||
<Link
|
||||
className={clsx('menu__link', !isInternalLink && styles.menuExternalLink, {
|
||||
'menu__link--active': isActive,
|
||||
})}
|
||||
autoAddBaseUrl={autoAddBaseUrl}
|
||||
aria-current={isActive ? 'page' : undefined}
|
||||
to={href}
|
||||
{...(isInternalLink && {
|
||||
onClick: onItemClick ? () => onItemClick(item) : undefined,
|
||||
})}
|
||||
{...props}
|
||||
>
|
||||
{label}
|
||||
{addIcons(className)}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<li
|
||||
className={clsx(
|
||||
ThemeClassNames.docs.docSidebarItemLink,
|
||||
ThemeClassNames.docs.docSidebarItemLinkLevel(level),
|
||||
'menu__list-item',
|
||||
className,
|
||||
styles[`sidebar_link_wrapper`]
|
||||
)}
|
||||
key={label}
|
||||
>
|
||||
{label}
|
||||
{addIcons(className)}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user