Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2c810e9
fix(docs): update version (#331)
skrdgraph Oct 20, 2022
4ba1c95
[Docs] Access Control Lists : add the command and random keys (#333)
Rajakavitha1 Oct 27, 2022
4096ae4
[Docs] Encryption at Rest: added a note for macOS (#334)
Rajakavitha1 Oct 27, 2022
d01e2ed
docs(release): Dgraph v22.0.0 release (#335)
MichelDiz Oct 31, 2022
b05f66c
Cherry pick/v22.0/glossary (#364)
rderbier Dec 14, 2022
004bba5
Cherry pick/v22.0/glossary update (#387)
rderbier Jan 13, 2023
5e9f635
Merge branch 'release/v22.0'
rderbier Jan 17, 2023
3fa1a02
Revamp(install) : merge to v22.0 (#409)
rderbier Jan 18, 2023
ce08046
change build script for branches (#425)
rderbier Jan 27, 2023
84c8c49
Algolia/v22.0 (#427)
rderbier Jan 30, 2023
3804b5c
Algolia/v22.0 (#429)
rderbier Jan 31, 2023
b91145a
Algolia/v22.0 (#430)
rderbier Jan 31, 2023
fae5fb3
Algolia/v22.0 (#431)
rderbier Jan 31, 2023
43b6bbc
remove graphql overview and references (#433)
rderbier Feb 1, 2023
6cda032
remove graphql overview and references (#434)
rderbier Feb 1, 2023
b95fd77
add v22.0.2 (#435)
rderbier Feb 1, 2023
97665b4
Revamp/import data (#437)
rderbier Feb 1, 2023
d43480f
Dgraph overview diagram (#438)
rderbier Feb 1, 2023
034c80b
upgrade hugo version to 0.91 (#443)
rderbier Feb 2, 2023
568aaa9
Docs(Lambda): Fix incorrect environment variable example (#449)
matthewmcneely Feb 10, 2023
15c3c6f
move type-system (#452)
rderbier Feb 13, 2023
68de9f6
[REVAMP]: move predicate types (ex schema) to DQL section (#454)
rderbier Feb 14, 2023
5a3f415
Revamp/howto drop data (#451)
rderbier Feb 14, 2023
a9ee580
Revamp/mutation syntax (#459)
rderbier Feb 14, 2023
399de45
revamp doc home (#463)
rderbier Feb 14, 2023
84068c6
Delete .hugo_build.lock
rderbier Feb 14, 2023
e992f39
ignore lock files
rderbier Feb 14, 2023
86d1133
graphql quickstart (#465)
rderbier Feb 15, 2023
4717578
avoid conflicts with cloud doc urls
rderbier Feb 15, 2023
a9c8f4c
re-organize graphql section (#466)
rderbier Feb 15, 2023
bc84b61
correct api ref
rderbier Feb 15, 2023
67a437d
move cloud pages in this repo (#468)
rderbier Feb 16, 2023
e8dbca7
move cloud folder
rderbier Feb 16, 2023
4071053
gqlschema section update (#471)
rderbier Feb 16, 2023
b095c41
Split info from the predicate page (#473)
rderbier Feb 16, 2023
381a21f
avoid conflict with cloud site (#476)
rderbier Feb 17, 2023
1c158d8
Update dgraph-overview.md (#475)
akon-dey Feb 22, 2023
ef83d67
fix audit decrypt flag
joshua-goldstein Feb 23, 2023
744eb20
Install rajie (#483)
rderbier Feb 24, 2023
58ff880
404 on Graphql Quickstart
rderbier Feb 26, 2023
7bd07b6
404 links in security
rderbier Feb 27, 2023
49c6376
Correct some 404
rderbier Feb 27, 2023
57a4e57
Merge branch 'main' into revamp/correct-404
rderbier Feb 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/dgraph-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions content/dgraphcloud/cloud-api/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -170,7 +170,7 @@ DEPLOYMENT_JWT="<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
Expand Down
12 changes: 6 additions & 6 deletions content/dgraphcloud/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type>` and `query<Type>` query operations. Checking Write will allow anonymous end clients to access the `add<Type>`, `update<Type>`, and `delete<Type>` 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.

Expand Down Expand Up @@ -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"
```

Expand Down
4 changes: 2 additions & 2 deletions content/enterprise-features/audit-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" >}}).
To learn more about the logging features of Dgraph, see [Logging]({{< relref "deploy/log-format.md" >}}).
2 changes: 1 addition & 1 deletion content/graphql/quick-start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
34 changes: 20 additions & 14 deletions content/graphql/schema/directives/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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)
Reference: [LambdaOnMutate directive]({{< relref "webhook.md" >}})

<style>
ul.contents {
display: none;
}
</style>
10 changes: 5 additions & 5 deletions content/installation/single-host-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -102,10 +102,10 @@ You can start Dgraph on a single host using the dgraph command line.
dgraph alpha --my=<IP_ADDRESS>: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.
Expand Down Expand Up @@ -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:
Expand All @@ -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://<CLOUD_IP_ADDRESS>:8080`
1. Click **Connect** . The connection health appears green.
1. Click **Continue** to query or run mutations.
{{% /tab %}}{{% /tabs %}}
{{% /tab %}}{{% /tabs %}}