Giter VIP home page Giter VIP logo

dgraph-docs's Introduction

Dgraph Documentation

To read the official Dgraph documentation that is published from this repository, please see https://dgraph.io/docs/.

Contribution guidelines

As a contributor to Dgraph documentation, we ask that you do the following:

  • Label your PR for easy management: Your PR title should be in the following format: Topic (area): details. The topic is either "Docs", "Nav" (aka, navigation), or "Chore" (for build fixes, cherry-picks, etc). The area is the feature (i.e. "GraphQL"), area of the docs (i.e., "Deployment"), or "Other" (for typo fixes and other bugfix PRs). So, example PR names include: Docs(GraphQL): Document the @deprecated annotation or Chore(Other): cherry-pick updates from main to release/v20.11
  • Develop in the main branch first: Make any changes applicable to the current (recently-released) version of Dgraph in the main branch first, and then cherry-pick those changes to the correct release branch (for example, release/v20.11).

Exception: Changes that only apply to older Dgraph versions (for example release/v20.07), can occur directly in a release branch, but will not be cherry-picked forward.

  • Note planned cherry-pick(s) in your PR description: If you are creating a PR in main and you know it needs to be cherry-picked to a release branch, please mention that in your PR description (for example: "cherry-pick to v20.07"). Cherry-pick PRs should reference the original PR.

  • Link to discuss.dgraph.io posts when applicable: If your PR is based on discussions on Discuss, feel free to include a link to the relevant discussion in your PR description.

  • Technical writing style: As much as possible, please follow technical writing style conventions (More on this below).

  • (Dgraph core team only): Include the ID of any issues/tickets related to your PR in the description (i.e., "Fixes DGRAPH-12345" or "Per DGRAPH-54321").

Technical writing style

Dgraph Labs uses a style guide for our documentation so that we can make it as easy to understand as possible. The Dgraph Style Guide is a concise style reference for our documentation, but it isn't comprehensive. For anything not found in our style guide, use Google's Developer Docs Style Guide.

Style tips for machine-translatable docs!

Making our documentation easy to understand includes optimizing it for client-side machine translation into other languages. To help with this, please see the following technical writing style tips:

  • Generally, use the second person ("you") rather than the third-person ("the developer") when addressing the reader.
  • Always use the third person when describing Dgraph database or features (avoid "this lets us" in favor of "this lets Dgraph").
  • Write in present-tense, active voice when you can.
  • Prefer simple sentences to complex and complex-compound sentences.

Note: Please don't let these style conventions stop you from creating a PR to share your contribution to Dgraph Docs! PR reviewers can help with style guide issues.

references

Use hugo shortcode for relref.

Example, to reference a term, use a relref to the glossary :

[entity]({{< relref "dgraph-glossary.md#entity" >}})

Staging doc updates locally

We use Hugo for our documentation. You can use Hugo to locally stage doc updates before or after creating a PR.

  1. Download and install hugo version v0.91 from here.

  2. Run the command below to get the theme.

    pushd themes && git clone https://github.com/dgraph-io/hugo-docs && popd
  3. Run ./scripts/local.sh and visit http://localhost:1313 to see the documentation site running on your local machine.

(Optional) To run queries within the documentation using a different Dgraph instance, set the DGRAPH_ENDPOINT environment variable before starting the local web server:

DGRAPH_ENDPOINT="http://localhost:8080/query?latency=true" ./scripts/local.sh

Now you can make changes to the docs and see them being updated instantly, thanks to Hugo.

Note: While running locally, the version selector does not work because you need to build the documentation and serve it behind a reverse proxy to have multiple versions. Also, formatting of lists is less fussy when running locally; so please precede lists with a blank line in your PR.

Running docs locally with Docker

Make sure you have docker-compose installed.

Run:

sh scripts/docker.sh

Branch

Depending on what branch you are on, some code examples will dynamically change. For example, go-grpc code examples will have different import path depending on the branch name.

Runnable code examples

Some code examples are runnable, allowing for reader interaction with a data set.

Custom example

Pass custom Go-GRPC example to the runnable by passing a customExampleGoGRPC to the runnable shortcode.

{{< runnable
  customExampleGoGRPC="this\nis\nan example"
>}}{
  director(func:allofterms(name, "steven spielberg")) {
    name@en
    director.film (orderdesc: initial_release_date) {
      name@en
      initial_release_date
    }
  }
}
{{< /runnable >}}

Note: Runnable doesn't support passing a multiline string as an argument to a shortcode. Therefore, you have to create the whole custom example in a single line string by replacing newlines with \n.

History

add Hypermode banner by updating the hugo-docs repository with topbat template.

dgraph-docs's People

Contributors

aaroncarey avatar abhimanyusinghgaur avatar all-seeing-code avatar aman-bansal avatar ashwin95r avatar bucanero avatar damonfeldman avatar danielmai avatar darkn3rd avatar deepakjois avatar gja avatar jdbohrman avatar mangalaman93 avatar manishrjain avatar martinmr avatar mbj36 avatar michaeljcompton avatar micheldiz avatar namanjain8 avatar omarayo avatar pawanrawal avatar prashant-shahi avatar rajakavitha1 avatar rderbier avatar sboorlagadda avatar sleto-it avatar srfrog avatar vardhanapoorv avatar verneleem avatar vmrajas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dgraph-docs's Issues

DGRAPH learn - Introduction to Dgraph for SQL Users - BROKEN REDIRECTION LINK

Hey, oppening this issue just to let you know that there is a broken link on a "Next Page" button

The Count Results page's next button redirects to : https://dgraph.io/courses/datamodel/sql-to-dgraph/develop/read-data/paginate-results/

And it should redirect to: https://dgraph.io/learn/courses/datamodel/sql-to-dgraph/develop/read-data/paginate-results/

Dunno if oppening an issue here is the correct thing to do but just wanted to let u know

Custom resolvers (custom query) page says all custom queries use HTTP

This page: https://dgraph.io/docs/graphql/custom/custom-overview/ states that "Dgraph doesn’t execute your custom logic itself. It makes external HTTP requests" but I believe the more performant approach is to use DQL extensions which are executed within the Dgraph process.

I suggest

_"Dgraph creates a GraphQL API from nothing more than GraphQL types. That’s great, and gets you moving fast from an idea to a running app. However, at some point, as your app develops, you might want to customize the behavior to perform more general query logic and processing.

In Dgraph, you do that with code (in any language you like) that implements custom resolvers.

One way to do this is by creating custom DQL resolvers that run efficiently directly in the Dgraph process.

Alternatively, external processes can be called during the query or mutation process. Dgraph doesn’t execute that custom logic itself - it makes external HTTP requests. That means you can deploy your custom logic into the same Kubernetes cluster as your Dgraph instance, deploy and call, for example, AWS Lambda functions, or even make calls to existing HTTP and GraphQL endpoints."_

Set contribution rules (RFC)

Any modification outside of these rules the PR will be refused.

1 - TODO -> Indentation of DQL, GraphQL and other code needs to be standardized(e.g: Tabs vs spaces - we need choose one and why). Because there can be no indentation conflict, if each one imposes their own way of working it becomes a mess. Each one will, for example, want to "repair" the previous indentation at their pleasure. It is not right.

2 - Modifications to current documentation content should have a clear and objective reason. If it's just a typo, it's valid without explanation. But any amendment that changes the concept must be rejected. In that case, please create something new to add in alignment with the context. Or explain how and why the change is needed.

cc @skrdgraph

Enabling ACL

Enabling ACL requires a secret key generation, but there is no command given with which they can generate said file. Also, in the example given below the directions, they used the following command:
echo '12345678901234567890123456789012' > hmac_secret_file
to generate the secret file. This is not randomly generated and is therefore not the best to use as an example.

Fixes: #305

dgraph-ratel command in Single Host Setup

https://dgraph.io/docs/deploy/single-host-setup/#run-dgraphs-ratel-ui

iirc dgraph-ratel is not part of the dgraph binary right? So I think it does not make sense to still have this command here, especially since in the previous "Download Dgraph" section, we don't tell the readers about downloading Ratel.

Edit: Or we should follow the one at the later part of this page (https://dgraph.io/docs/deploy/single-host-setup/#run-dgraphs-ratel-ui-1), which is the second image.

Screen Shot 2022-10-06 at 17 20 18

Screen Shot 2022-10-06 at 17 24 45

Revamp HowTo - Import Export data

Create a HowTo entry for "importing and exporting your data"
Merge info from
https://dgraph.io/docs/cloud/admin/import-export/
https://dgraph.io/docs/deploy/fast-data-loading/overview/
https://dgraph.io/docs/deploy/fast-data-loading/live-loader/
https://dgraph.io/docs/deploy/fast-data-loading/bulk-loader/
and there is a reference to export import in https://dgraph.io/docs/cloud/cloud-api/backup/

Clean old pages and reference this howto when we mention export import.

revamp - missing DQL overview

we need an overview of DQL explaining the query language structure, the vocabulary (root, filter, func, etc ...) and the high level capabilities (filtering, recursivity, pagination etc ....) pointing to the language reference.

Encryption at rest

In the Note at the very top of the encryption at rest, there are 3 links to other pages. For two of those:

  1. Clicking on fast data load redirects you to the deploy and manage page with an option to then click on fast data load. This is inconsistent with most other links since the redirect directly to the page of the topic we click on. So, instead of it redirecting to the deploy and manage page, can we redirect it to the fast data load page?

  2. Same with clicking on bulk loader. It redirects to a parent page with an option to then click on the bulk loader page. This is inconsistent with other links to the bulk loader page where they directly redirect to the bulk loader page.

revamp - howto drop data

Consolidate information on how to drop data.
Drop graphql data with mutation
Drop predicates, types ar all using /alter

Performance issue with count index

When we add count index in our schema, the insertion of new tuples is very slow. Without count index we have around 50000 insertions/sec, but we add the count index, we insertions falls to 100 insertions/sec.
We think this is a bug, but we are not sure.
Thanks in advance

Dgraph overview revamp

Align Dgraph overview page with new standard.
Describe what Dgraph is
Introduce personae for GraphQL and DQL and point to the rest of documentation accordingly
High level architecture "How it works"
Hosting options
Whats' next.|

Quotation marks needed for superflags

See my PR here

In our docs we do not show quotes around superflags. However commands like

dgraph zero --audit output=audit-log-dir;compress=false;encrypt-file=enc-key

will fail to execute correctly without the quotes, because only the first flag will get parsed. In my PR I add quotes to a few commands related to audit logging. Presumably this is an issue elsewhere. I am not sure if it would be better to add double or single quotes.

Essential information missing on page about compression

Hi,

The above-mentioned page doesn't mention the following important things:

  • vlog files are not compressed
  • values that are bigger than 1 MB are stored in vlog files (and therefore not compressed)

I think, there also should be information about what to do if many values bigger than 1 MB need to be stored.

For example: Can the threshold of 1 MB be increased?

Or: Can the vlog mechanism be deactivated? (I've seen your founder mention this possibility somewhere, but I believe, this wasn't implemented so far).

Edit:

Background/reference: A thread I started on the forum

It would also be useful to know if there is a built-in way to measure if the 1 MB threshold was reached. And also, what the 1 MB exactly is referring to (I'm assuming to all data of the key/value-pair).

Edit 2:

I'm also wondering if the 1 MB threshold is referring to the raw or the compressed data (being able to store 1 MB of compressed data vs. 1 MB of uncompressed data is a big difference).

revamp - missing DQL GraphQL interop

Explain the relation between GraphQL and DQL :

  • the fact that Dgraph translates the GraphQL schema into a Dgraph schema
  • the naming convention
  • importing data for a GraphQL generated schema using RDF
  • DQL in Lambda (pointing to the GraphQL doc maybe)
  • the current limitation : deleting a mandatory predicate is possible leading to errors in GraphQL, corrupting the schema generated by the GraphQL deploy, etc ...

Fix latest release version

Screen Shot 2022-10-19 at 17 26 33

^ this is wrong!

We have to do 2 things here:

  • adjust docs latest to v22
  • mark v21.12 as not-supported*

Cleanup FAQ Page

FAQ page here has not been updated in a long time. In particular:

  • Product roadmap links to a Github issue from 2020
  • Contrib section should link to main branch on dgraph instead of master
  • Criticism section ("Dgraph is not highly available") looks like a copy-paste from a reddit thread and should be rewritten and definitely remove all use of the first person.
  • Overall the page could use a refresh and perhaps some additional FAQs

Docs: "removing a pod" lost in new docs version

The old page here: https://github.com/dgraph-io/dgraph-docs/blob/ed6f1dbb591234fa5c4eb704b593526b65a5050c/content/installation/kubernetes.md has a "removing a pod" section documenting how to use /removeNode and K8s delete to force a pod to be removed and rebuilt from a healthy pod with a correct p directory (rebuild in case of data issues on one node).

The removal process should be documented, perhaps in troubleshooting or how-to guides (or a link in troubleshooting about a bad p directory linked to the how to guide on removing an alpha)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.