diff --git a/content/dgraph-overview.md b/content/dgraph-overview.md index ad7ac4ee..c370232e 100644 --- a/content/dgraph-overview.md +++ b/content/dgraph-overview.md @@ -110,7 +110,7 @@ Every cluster will have at least one Dgraph Zero node and one Dgraph Alpha node. - **Sharding**: When data sizes approach or exceed 1 TB, Dgraph databases are typically sharded so that full data replicas are not kept on any single alpha node. With sharding, data is distributed across many nodes (or node groups) to achieve higher scale. Sharding and high-availability combine when desired to provide massive scale and ideal reliability. -**Self-healing**: In Dgraph's cloud offering, Kubernetes is used to automatically detect, restart and heal any cluster (HA, sharded, both or neither) to keep things running smoothly and at full capacity. +- **Self-healing**: In Dgraph's cloud offering, Kubernetes is used to automatically detect, restart and heal any cluster (HA, sharded, both or neither) to keep things running smoothly and at full capacity. ## What's Next diff --git a/content/dgraphcloud/cloud-api/backup.md b/content/dgraphcloud/cloud-api/backup.md index 1fe4ac2b..375247d9 100644 --- a/content/dgraphcloud/cloud-api/backup.md +++ b/content/dgraphcloud/cloud-api/backup.md @@ -7,18 +7,18 @@ weight = 3 +++ {{% notice "note" %}} -Backup feature is only available for Dedicated Instances. This feature is not available for the Free and Shared Instances. +Backup feature is only available for Dedicated Instances. This feature is not available for the Free and Shared Instances. {{% /notice %}} ## Periodic Backups Periodic Backups are created at a given schedule that by default is: -- Full Backup every week -- Incremental Backups every 4 hours +- Full Backup every week +- Incremental Backups every 4 hours -You can trigger the Backup on-demand directelly from your Dgraph Cloud Dashboard, simply go to Admin>Setting>Backups and click on "Create Backup" button on the top left. +You can trigger the Backup on-demand directly from your Dgraph Cloud Dashboard, simply go to Admin>Setting>Backups and click on "Create Backup" button on the top left. -In case you would like to change your default Backup schedule please contact us and we will be happy to set you up. +In case you would like to change your default Backup schedule please contact us and we will be happy to set you up. ## List Backups @@ -62,7 +62,7 @@ curl "https://${DEPLOYMENT_URL}/admin/slash" \ --data-binary '{"query":"{\n listBackups {\n response {\n type\n backupNum\n folder\n timestamp\n }, errors {\n message\n }\n} \n}","variables":{}}' \ --compressed ``` -{{< /tab >}} +{{< /tab >}} {{% tab "response" %}} ```json @@ -127,7 +127,7 @@ curl "https://${DEPLOYMENT_URL}/admin/slash" \ --data-binary '{"query":"mutation {\n export {\n signedUrls\n }\n }","variables":{}}' \ --compressed ``` -{{< /tab >}} +{{< /tab >}} {{% tab "response" %}} ```json @@ -170,7 +170,7 @@ DEPLOYMENT_JWT="" docker run -it --rm -v /users/dgraph/downloads:/tmp dgraph/dgraph:v21.03-slash \ dgraph live --slash_grpc_endpoint=${DEPLOYMENT_URL}:443 -f /tmp/1million.rdf.gz -t ${DEPLOYMENT_JWT} ``` -{{< /tab >}} +{{< /tab >}} {{% tab "response" %}} ```json diff --git a/content/dgraphcloud/security.md b/content/dgraphcloud/security.md index 0bbf15a2..5a338a3c 100644 --- a/content/dgraphcloud/security.md +++ b/content/dgraphcloud/security.md @@ -11,15 +11,15 @@ Here are a few tips for securing your Dgraph Cloud Backend To help secure your GraphQL API, Dgraph Cloud allows you to choose which GraphQL operations are available to end clients. -You can visit the [access tab on the schema page](https://cloud.dgraph.io/_/schema) and choose the operations that you want to allow/deny for anonymous users. +You can visit the [access tab on the schema page](https://cloud.dgraph.io/_/schema) and choose the operations that you want to allow/deny for anonymous users. -With Anonymous Access turned off, all GraphQL operations are restricted unless the client provides a valid [API Key](/admin/authentication). With Anonymous Access turned on (Default configuration), you will have a button to "Edit Permissions" +With Anonymous Access turned off, all GraphQL operations are restricted unless the client provides a valid [API Key]({{< relref "dgraphcloud/admin/authentication.md" >}}). With Anonymous Access turned on (Default configuration), you will have a button to "Edit Permissions" In Edit Permissions, you will find options to turn on/off Anonymous Access to Lambda functions, custom Queries, and custom Mutations. For every Type defined in your GraphQL schema, Edit Permissions will show check boxes to enable Anonymous Access to Read and Write. Checking Read will allow the anonymous end clients to access the `get` and `query` query operations. Checking Write will allow anonymous end clients to access the `add`, `update`, and `delete` mutation operations. By default all operations are accessible to anonymous clients. However, this behavior will change in the near future. When this behavior is changed, it will apply only to newly created backends. Existing backends will remain unaffected by this future change. -Anonymous Access works as an access control security one level above the [GraphQL `@auth` Directive](https://dgraph.io/docs/graphql/authorization/directive/). When you block anonymous access to your backend, the GraphQL requests from the client will not go through to the Dgraph database. When Anonymous Access is blocked, the GraphQL Auth Rules are not evaluated against the database. +Anonymous Access works as an access control security one level above the [GraphQL `@auth` Directive]({{< relref "auth.md" >}}). When you block anonymous access to your backend, the GraphQL requests from the client will not go through to the Dgraph database. When Anonymous Access is blocked, the GraphQL Auth Rules are not evaluated against the database. Anonymous Access granted on level types only applies to the parent type operations and is not meant to be a way to secure all data of that type. It is still possible to read/write data of a Type that has been set with no read/write permissions if other types are granted read/write access to anonymous clients. @@ -112,16 +112,16 @@ const client = new ApolloClient({ ### Writing Auth Rules -Once a client has been granted access to an operation with either Anonymous Access granted or as an authenticated client using an API Key, the GraphQL query or mutation is then unrestricted by default. In order to further restrict access, please see the [the @auth directive](https://dgraph.io/docs/graphql/authorization/directive/). +Once a client has been granted access to an operation with either Anonymous Access granted or as an authenticated client using an API Key, the GraphQL query or mutation is then unrestricted by default. In order to further restrict access, please see the [the @auth directive]({{< relref "auth.md" >}}). ### Restricting CORS Restricting the origins that your Dgraph Cloud responds to is an important step in preventing XSS exploits. By default, we allow requesting code from any origin access to your Dgraph Cloud resources (`Access-Control-Allow-Origin: *`), but by explicitly specifying the permitted origins this default behavior can be overridden. -To allow an origin, add the line `# Dgraph.Allow-Origin` at the end of your GraphQL schema either with a [schema update](https://dgraph.io/docs/graphql/admin/#using-updategqlschema-to-add-or-modify-a-schema) or via the Cloud console's [Schema](https://cloud.dgraph.io/_/schema) page. For example, the following will restrict all origins except the ones specified. +To allow an origin, add the line `# Dgraph.Allow-Origin` at the end of your GraphQL schema either with a [schema update]({{< relref "graphql/admin.md#using-updategqlschema-to-add-or-modify-a-schema" >}}) or via the Cloud console's [Schema](https://cloud.dgraph.io/_/schema) page. For example, the following will restrict all origins except the ones specified. ``` -# Dgraph.Allow-Origin "https://example.com" +# Dgraph.Allow-Origin "https://example.com" # Dgraph.Allow-Origin "https://www.example.com" ``` diff --git a/content/enterprise-features/audit-logs.md b/content/enterprise-features/audit-logs.md index 1fe51b4a..b63f4934 100644 --- a/content/enterprise-features/audit-logs.md +++ b/content/enterprise-features/audit-logs.md @@ -143,9 +143,9 @@ To decrypt encrypted audit logs, you can use the `dgraph audit decrypt` command, as follows: ```bash -dgraph audit decrypt --encryption key-file=/path/encrypt/key/file --in /path/to/encrypted/log/file --out /path/to/output/file +dgraph audit decrypt --encryption_key_file=/path/encrypt/key/file --in /path/to/encrypted/log/file --out /path/to/output/file ``` ## Next steps -To learn more about the logging features of Dgraph, see [Logging]({{< relref "deploy/log-format.md" >}}). \ No newline at end of file +To learn more about the logging features of Dgraph, see [Logging]({{< relref "deploy/log-format.md" >}}). diff --git a/content/graphql/lambda/overview.md b/content/graphql/lambda/lambda-overview.md similarity index 100% rename from content/graphql/lambda/overview.md rename to content/graphql/lambda/lambda-overview.md diff --git a/content/graphql/quick-start/index.md b/content/graphql/quick-start/index.md index 4c17b9a8..e66d7734 100644 --- a/content/graphql/quick-start/index.md +++ b/content/graphql/quick-start/index.md @@ -256,5 +256,5 @@ For GraphQL in Dgraph, you just concentrate on defining the schema of your graph ## What's Next -- Learn more about [GraphQL schema](/graphql/schema/schema-overview/) and Dgraph directives. +- Learn more about [GraphQL schema]({{< relref "graphql/schema/_index.md" >}}) and Dgraph directives. - Follow our [GraphQL tutorials](https://dgraph.io/learn/) to experience rapid application development by building more advanced apps. diff --git a/content/graphql/schema/directives/_index.md b/content/graphql/schema/directives/_index.md index dee153d7..d2fc89f9 100644 --- a/content/graphql/schema/directives/_index.md +++ b/content/graphql/schema/directives/_index.md @@ -12,7 +12,7 @@ The list of all directives supported by Dgraph. `@auth` allows you to define how to apply authorization rules on the queries/mutation for a type. -Reference: [Auth directive](/graphql/authorization/directive) +Reference: [Auth directive]({{< relref "auth.md" >}}) ### @cascade @@ -24,7 +24,7 @@ Reference: [Cascade](/graphql/queries/cascade) `@custom` directive is used to define custom queries, mutations and fields. -Reference: [Custom directive](/graphql/custom/directive) +Reference: [Custom directive]({{< relref "graphql/custom/directive.md" >}}) ### @deprecated @@ -42,73 +42,79 @@ Reference: [GraphQL on Existing Dgraph]({{< relref "graphql/dgraph/index.md" >}} The `@generate` directive is used to specify which GraphQL APIs are generated for a type. -Reference: [Generate directive](/graphql/schema/generate) +Reference: [Generate directive]({{< relref "generate.md" >}}) ### @hasInverse `@hasInverse` is used to setup up two way edges such that adding a edge in one direction automically adds the one in the inverse direction. -Reference: [Linking nodes in the graph](/graphql/schema/graph-links) +Reference: [Linking nodes in the graph]({{< relref "graph-links.md" >}}) ### @id `@id` directive is used to annotate a field which represents a unique identifier coming from outside of Dgraph. -Reference: [Identity](/graphql/schema/ids) +Reference: [Identity](({{< relref "ids.md" >}}) ### @include The `@include` directive can be used to include a field based on the value of an `if` argument. -Reference: [Include directive](/graphql/queries/skip-include) +Reference: [Include directive]({{< relref "skip-include.md" >}}) ### @lambda The `@lambda` directive allows you to call custom JavaScript resolvers. The `@lambda` queries, mutations, and fields are resolved through the lambda functions implemented on a given lambda server. -Reference: [Lambda directive](/graphql/lambda/overview) +Reference: [Lambda directive]({{< relref "lambda-overview.md" >}}) ### @remote `@remote` directive is used to annotate types for which data is not stored in Dgraph. These types are typically used with custom queries and mutations. -Reference: [Remote directive](/graphql/custom/directive/#remote-types) +Reference: [Remote directive]({{< relref "directive.md#remote-types" >}}) ### @remoteResponse The `@remoteResponse` directive allows you to annotate the fields of a `@remote` type in order to map a custom query's JSON key response to a GraphQL field. -Reference: [Remote directive](/graphql/custom/directive/#remote-response) +Reference: [Remote directive]({{< relref "directive.md##remote-response" >}}) ### @search `@search` allows you to perform filtering on a field while querying for nodes. -Reference: [Search](/graphql/schema/search) +Reference: [Search]({{< relref "search.md" >}}) ### @secret `@secret` directive is used to store secret information, it gets encrypted and then stored in Dgraph. -Reference: [Password Type](/graphql/schema/types/#password-type) +Reference: [Password Type]({{< relref "types.md#password-type" >}}) ### @skip The `@skip` directive can be used to fetch a field based on the value of a user-defined GraphQL variable. -Reference: [Skip directive](/graphql/queries/skip-include) +Reference: [Skip directive]({{< relref "skip-include.md" >}}) ### @withSubscription `@withSubscription` directive when applied on a type, generates subsciption queries for it. -Reference: [Subscriptions](/graphql/subscriptions) +Reference: [Subscriptions]({{< relref "subscriptions.md" >}}) ### @lambdaOnMutate The `@lambdaOnMutate` directive allows you to listen to mutation events(`add`/`update`/`delete`). Depending on the defined events and the occurrence of a mutation event, `@lambdaOnMutate` triggers the appropriate lambda function implemented on a given lambda server. -Reference: [LambdaOnMutate directive](/graphql/lambda/webhook) \ No newline at end of file +Reference: [LambdaOnMutate directive]({{< relref "webhook.md" >}}) + + diff --git a/content/installation/single-host-setup.md b/content/installation/single-host-setup.md index af16cee3..a81c59fd 100644 --- a/content/installation/single-host-setup.md +++ b/content/installation/single-host-setup.md @@ -76,7 +76,7 @@ You can now use Ratel UI on your browser at localhost:8000 and connect to you Dg To override the default ports for the second Alpha use `-o`. 1. Connect the Dgraph cluster that are running using https://play.dgraph.io/. For information about connecting, see [Ratel UI]({{< relref "ratel/connection.md" >}}). -{{< /tab >}} +{{< /tab >}} {{< tab "Dgraph Command Line" >}} You can run Dgraph directly on a single Linux host. @@ -102,10 +102,10 @@ You can start Dgraph on a single host using the dgraph command line. dgraph alpha --my=:7081 --zero=localhost:5080 -o=1 ``` Dgraph alpha nodes use two directories to persist data and [WAL logs]({{< relref "design-concepts/concepts#write-ahead-logs" >}}), and these directories must be different for each alpha if they are running on the same host. You can use `-p` and `-w` to change the location of the data and WAL directories.To learn more about other flags, run `dgraph alpha --help`. - + 1. Connect the Dgraph cluster that are running using https://play.dgraph.io/. For information about connecting, see [Ratel UI]({{< relref "ratel/connection.md" >}}). -{{{< /tab >}} +{{{< /tab >}} {{< tab "Docker Compose" >}} You can install Dgraph using the Docker Compose on a system hosted on any of the cloud provider. @@ -155,7 +155,7 @@ You can install Dgraph using the Docker Compose on a system hosted on any of the image: dgraph/ratel:latest ports: - 8000:8000 - + ``` 1. Run the `docker-compose` command to start the Dgraph services in the docker container: @@ -182,4 +182,4 @@ You can install Dgraph using the Docker Compose on a system hosted on any of the 1. In the **Dgraph Server Connection** dialog that set the **Dgraph server URL** as `http://:8080` 1. Click **Connect** . The connection health appears green. 1. Click **Continue** to query or run mutations. -{{% /tab %}}{{% /tabs %}} \ No newline at end of file +{{% /tab %}}{{% /tabs %}}