Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about mutation flag #4128

Merged
merged 7 commits into from Oct 9, 2019

Conversation

@prashant-shahi
Copy link
Member

commented Oct 4, 2019

Resolve of issue #4086

This change is Reviewable

@prashant-shahi prashant-shahi requested a review from campoy Oct 4, 2019
Copy link

left a comment

A review job has been created and sent to the PullRequest network.


Check the status or cancel PullRequest code review here.

Copy link

left a comment

1 Message
It looks like the description for this pull request is either blank or very short. Adding a high-level summary will help our reviewers provide better feedback. Feel free to include questions for PullRequest reviewers and make specific feedback requests.

@campoy
campoy approved these changes Oct 4, 2019
Copy link
Member

left a comment

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @danielmai and @MichaelJCompton)

Copy link
Member

left a comment

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @MichaelJCompton and @prashant-shahi)


wiki/content/deploy/index.md, line 1814 at r1 (raw file):

By default, you can perform mutation operations for any existing or non-existing predicates. You can make use of `--mutations` flag to set the restriction, which is by default set to `allow`.

You can set ``--mutations` option to `disallow` to disable the mutations.

Type: Double backticks here.


wiki/content/deploy/index.md, line 1817 at r1 (raw file):

```sh
dgraph alpha --mutation disallow ...

The flag is mutations, with an s at the end.


wiki/content/deploy/index.md, line 1820 at r1 (raw file):

You can set ``--mutationsoption tostrict` to limit mutations to only existing predicates in the schema, and disable mutations of unknown predicates.

Type: Double backticks here.


wiki/content/deploy/index.md, line 1820 at r1 (raw file):

You can set ``--mutationsoption tostrict` to limit mutations to only existing predicates in the schema, and disable mutations of unknown predicates.

Mention something about "strict schema" to make it more searchable.


wiki/content/deploy/index.md, line 1823 at r1 (raw file):

```sh
dgraph alpha --mutation strict ...

The flag is mutations, with an s at the end.

Copy link
Member

left a comment

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @MichaelJCompton and @prashant-shahi)


wiki/content/deploy/index.md, line 1814 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

Type: Double backticks here.

Typo*. (Oops, typo in my review comment.)

@prashant-shahi prashant-shahi requested a review from danielmai Oct 4, 2019
Copy link

left a comment

Good addition to the docs, the examples are clear and go well with the descriptions. I pointed out some minor grammatical nits to consider.


Reviewed with ❤️ by PullRequest

wiki/content/deploy/index.md Outdated Show resolved Hide resolved
wiki/content/deploy/index.md Show resolved Hide resolved
@mangalaman93 mangalaman93 requested a review from campoy Oct 7, 2019
Copy link
Contributor

left a comment

Reviewable status: 0 of 1 files reviewed, 12 unresolved discussions (waiting on @campoy, @MichaelJCompton, and @prashant-shahi)


wiki/content/deploy/index.md, line 1812 at r3 (raw file):

### Restrict Mutation Operations

By default, you can perform mutation operations for any existing or non-existing predicates.

any predicate


wiki/content/deploy/index.md, line 1813 at r3 (raw file):

By default, you can perform mutation operations for any existing or non-existing predicates.
You can make use of `--mutations` flag to set the restriction which is set to `allow` by default.

set what restriction?


wiki/content/deploy/index.md, line 1818 at r3 (raw file):

```sh
dgraph alpha --mutations disallow ...

Add a working command


wiki/content/deploy/index.md, line 1821 at r3 (raw file):

You can set --mutations option to strict to limit mutations to only existing predicates

Too many to, hard to make sense of the statement.


wiki/content/deploy/index.md, line 1825 at r3 (raw file):

```sh
dgraph alpha --mutations strict ...

same here

- Simpliflying descriptions
- Adding a working example
- Adding little more about strict schema
Copy link
Member Author

left a comment

Reviewable status: 0 of 1 files reviewed, 12 unresolved discussions (waiting on @campoy, @danielmai, @mangalaman93, @MichaelJCompton, @prashant-shahi, and @pullrequest[bot])


wiki/content/deploy/index.md, line 1814 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

Typo*. (Oops, typo in my review comment.)

Done.


wiki/content/deploy/index.md, line 1817 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

The flag is mutations, with an s at the end.

Done.


wiki/content/deploy/index.md, line 1820 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

Type: Double backticks here.

Done.


wiki/content/deploy/index.md, line 1820 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

Mention something about "strict schema" to make it more searchable.

Done.


wiki/content/deploy/index.md, line 1823 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

The flag is mutations, with an s at the end.

Done.


wiki/content/deploy/index.md, line 1811 at r2 (raw file):

Previously, pullrequest[bot] wrote…

Super-nit: This seems like it would be an easier read if we say, "which is set to allow by default.". Additionally the comma before 'which' is not needed to make this sentence grammatically correct.

Done.


wiki/content/deploy/index.md, line 1820 at r2 (raw file):

Previously, pullrequest[bot] wrote…

Grammar nit: Usually we don't use a comma before 'and' if there was only one other item before the 'and'.

Done.


wiki/content/deploy/index.md, line 1821 at r3 (raw file):

Previously, mangalaman93 (Aman Mangal) wrote…

Too many to, hard to make sense of the statement.

Done.


wiki/content/deploy/index.md, line 1825 at r3 (raw file):

Previously, mangalaman93 (Aman Mangal) wrote…

same here

Done.

Copy link
Member Author

left a comment

Reviewable status: 0 of 1 files reviewed, 12 unresolved discussions (waiting on @campoy, @danielmai, @mangalaman93, @MichaelJCompton, and @pullrequest[bot])


wiki/content/deploy/index.md, line 1812 at r3 (raw file):

Previously, mangalaman93 (Aman Mangal) wrote…

any predicate

Done.


wiki/content/deploy/index.md, line 1813 at r3 (raw file):

Previously, mangalaman93 (Aman Mangal) wrote…

set what restriction?

Done.


wiki/content/deploy/index.md, line 1818 at r3 (raw file):

Previously, mangalaman93 (Aman Mangal) wrote…

Add a working command

Done.

@prashant-shahi prashant-shahi requested a review from mangalaman93 Oct 7, 2019
@campoy
campoy approved these changes Oct 7, 2019
Copy link
Member

left a comment

:lgtm:

Reviewable status: 0 of 1 files reviewed, 12 unresolved discussions (waiting on @campoy, @danielmai, @mangalaman93, @MichaelJCompton, and @pullrequest[bot])

Copy link
Contributor

left a comment

Looks fine. I just found "You can set" repeated three times to be a bit repetitive. I added some suggestions.

Reviewable status: 0 of 1 files reviewed, 14 unresolved discussions (waiting on @campoy, @danielmai, @mangalaman93, @prashant-shahi, and @pullrequest[bot])


wiki/content/deploy/index.md, line 1816 at r4 (raw file):

You can set `--mutations` option to `disallow` to disable the mutations.

Use --mutations disallow to disable all mutations.


wiki/content/deploy/index.md, line 1822 at r4 (raw file):

You can set --mutations option to strict for limiting mutations to only

Enforce a strict schema by setting --mutations strict. This allows only mutations on predicates already in the schema.

@prashant-shahi prashant-shahi merged commit a4b82c0 into master Oct 9, 2019
4 of 5 checks passed
4 of 5 checks passed
code-review/reviewable 1 file, 14 discussions left (campoy, danielmai, mangalaman93, prashant-shahi, pullrequest[bot])
Details
CI (dgraph) TeamCity build finished
Details
DeepSource: Go Analysis Passed: No blocking issues detected.
Details
GolangCI No issues found!
Details
license/cla Contributor License Agreement is signed.
Details
@prashant-shahi prashant-shahi deleted the prashant/mutation-flag-docs branch Oct 9, 2019
@prashant-shahi

This comment has been minimized.

Copy link
Member Author

commented Oct 9, 2019

If anyone has any change suggestions about the same, please feel free to mention them here.
I will be creating another PR addressing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.