Skip to content

Commit

Permalink
feat(src/*): change now in function names to commit
Browse files Browse the repository at this point in the history
This is to better match the dgraph api. Commit is a better term IMHO as it's less ambigous.

BREAKING CHANGE: Any function that previously had the word now, has the word commit in it instead.

#11
  • Loading branch information
vespertilian committed Apr 13, 2019
1 parent 5576912 commit 2f66e99
Show file tree
Hide file tree
Showing 47 changed files with 338 additions and 338 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#### DGraph JS Extras


A library of helper functions to accompany the dgraph-js library. **Currently in an ALPHA state could break at any point**

Functions with the postfix "txn" indicate they are transactions and can be awaited.
Functions including "commit" indicate they will be set to "commitNow"
Functions including "txn" indicate they create their own transactions and can be directly awaited.

Other operations like JS set return a mutation that needs to be used in conjunction with a transaction.


## Workflow

1. Make changes
Expand All @@ -18,4 +17,4 @@ Other operations like JS set return a mutation that needs to be used in conjunct
6. Publish `yarn publish`
7. Commit `package.json`, `CHANGELOG.md` and lib files
8. Git tag - needed by changelog to know what version to attribute the commits to
9. Push
9. Push
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ <h1> dgraph-js-extras</h1>
<div class="tsd-panel tsd-typography">
<h4 id="dgraph-js-extras">DGraph JS Extras</h4>
<p>A library of helper functions to accompany the dgraph-js library. <strong>Currently in an ALPHA state could break at any point</strong></p>
<p>Functions with the postfix &quot;txn&quot; indicate they are transactions and can be awaited.</p>
<p>Functions including &quot;commit&quot; indicate they will be set to &quot;commitNow&quot;
Functions including &quot;txn&quot; indicate they create their own transactions and can be directly awaited.</p>
<p>Other operations like JS set return a mutation that needs to be used in conjunction with a transaction.</p>
<h2 id="workflow">Workflow</h2>
<ol>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/query.ixqueryparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3>query</h3>
<div class="tsd-signature tsd-kind-icon">query<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/query/query.ts#L9">query/query.ts:9</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/query/query.ts#L9">query/query.ts:9</a></li>
</ul>
</aside>
</section>
Expand All @@ -107,7 +107,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> vars</h3>
<div class="tsd-signature tsd-kind-icon">vars<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/query/query.ts#L10">query/query.ts:10</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/query/query.ts#L10">query/query.ts:10</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
Expand Down
6 changes: 3 additions & 3 deletions docs/interfaces/testhelpers.icreatedgraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3>dgraph<wbr>Client</h3>
<div class="tsd-signature tsd-kind-icon">dgraph<wbr>Client<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DgraphClient</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/create-client/create-dgraph-client.ts#L15">create-client/create-dgraph-client.ts:15</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/create-client/create-dgraph-client.ts#L15">create-client/create-dgraph-client.ts:15</a></li>
</ul>
</aside>
</section>
Expand All @@ -107,7 +107,7 @@ <h3>dgraph<wbr>Client<wbr>Stub</h3>
<div class="tsd-signature tsd-kind-icon">dgraph<wbr>Client<wbr>Stub<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DgraphClientStub</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/create-client/create-dgraph-client.ts#L16">create-client/create-dgraph-client.ts:16</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/create-client/create-dgraph-client.ts#L16">create-client/create-dgraph-client.ts:16</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -190,7 +190,7 @@ <h3>dgraph<wbr>Client<wbr>Stub</h3>
<a href="../modules/testhelpers.html#xsetupfortest" class="tsd-kind-icon">x<wbr>Setup<wbr>For<wbr>Test</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/testhelpers.html#xsetupwithschemadatanowtxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Now<wbr>Txn</a>
<a href="../modules/testhelpers.html#xsetupwithschemadatacommittxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Commit<wbr>Txn</a>
</li>
</ul>
</nav>
Expand Down
10 changes: 5 additions & 5 deletions docs/interfaces/testhelpers.icreatedgraphclientconfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> debug</h3>
<div class="tsd-signature tsd-kind-icon">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/create-client/create-dgraph-client.ts#L11">create-client/create-dgraph-client.ts:11</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/create-client/create-dgraph-client.ts#L11">create-client/create-dgraph-client.ts:11</a></li>
</ul>
</aside>
</section>
Expand All @@ -109,7 +109,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> host</h3>
<div class="tsd-signature tsd-kind-icon">host<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/create-client/create-dgraph-client.ts#L10">create-client/create-dgraph-client.ts:10</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/create-client/create-dgraph-client.ts#L10">create-client/create-dgraph-client.ts:10</a></li>
</ul>
</aside>
</section>
Expand All @@ -119,7 +119,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> log<wbr>Address</h3>
<div class="tsd-signature tsd-kind-icon">log<wbr>Address<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/create-client/create-dgraph-client.ts#L12">create-client/create-dgraph-client.ts:12</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/create-client/create-dgraph-client.ts#L12">create-client/create-dgraph-client.ts:12</a></li>
</ul>
</aside>
</section>
Expand All @@ -129,7 +129,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> port</h3>
<div class="tsd-signature tsd-kind-icon">port<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/create-client/create-dgraph-client.ts#L9">create-client/create-dgraph-client.ts:9</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/create-client/create-dgraph-client.ts#L9">create-client/create-dgraph-client.ts:9</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -218,7 +218,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> port</h3>
<a href="../modules/testhelpers.html#xsetupfortest" class="tsd-kind-icon">x<wbr>Setup<wbr>For<wbr>Test</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/testhelpers.html#xsetupwithschemadatanowtxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Now<wbr>Txn</a>
<a href="../modules/testhelpers.html#xsetupwithschemadatacommittxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Commit<wbr>Txn</a>
</li>
</ul>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/testhelpers.ischemamap.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h3 class="tsd-before-signature">Indexable</h3>
<a href="../modules/testhelpers.html#xsetupfortest" class="tsd-kind-icon">x<wbr>Setup<wbr>For<wbr>Test</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/testhelpers.html#xsetupwithschemadatanowtxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Now<wbr>Txn</a>
<a href="../modules/testhelpers.html#xsetupwithschemadatacommittxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Commit<wbr>Txn</a>
</li>
</ul>
</nav>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/testhelpers.isetupreturnvalue.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h3>dgraph<wbr>Client</h3>
<div class="tsd-signature tsd-kind-icon">dgraph<wbr>Client<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DgraphClient</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/test-helpers/setup.ts#L13">test-helpers/setup.ts:13</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/test-helpers/setup.ts#L13">test-helpers/setup.ts:13</a></li>
</ul>
</aside>
</section>
Expand All @@ -108,7 +108,7 @@ <h3>dgraph<wbr>Client<wbr>Stub</h3>
<div class="tsd-signature tsd-kind-icon">dgraph<wbr>Client<wbr>Stub<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DgraphClientStub</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/test-helpers/setup.ts#L14">test-helpers/setup.ts:14</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/test-helpers/setup.ts#L14">test-helpers/setup.ts:14</a></li>
</ul>
</aside>
</section>
Expand All @@ -118,7 +118,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> result</h3>
<div class="tsd-signature tsd-kind-icon">result<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Assigned</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/test-helpers/setup.ts#L15">test-helpers/setup.ts:15</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/test-helpers/setup.ts#L15">test-helpers/setup.ts:15</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -204,7 +204,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> result</h3>
<a href="../modules/testhelpers.html#xsetupfortest" class="tsd-kind-icon">x<wbr>Setup<wbr>For<wbr>Test</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/testhelpers.html#xsetupwithschemadatanowtxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Now<wbr>Txn</a>
<a href="../modules/testhelpers.html#xsetupwithschemadatacommittxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Commit<wbr>Txn</a>
</li>
</ul>
</nav>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/testhelpers.isetupwithparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> data</h3>
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/test-helpers/setup.ts#L35">test-helpers/setup.ts:35</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/test-helpers/setup.ts#L35">test-helpers/setup.ts:35</a></li>
</ul>
</aside>
</section>
Expand All @@ -108,7 +108,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> debug<wbr>Dgraph<wbr>
<div class="tsd-signature tsd-kind-icon">debug<wbr>Dgraph<wbr>Client<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/test-helpers/setup.ts#L36">test-helpers/setup.ts:36</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/test-helpers/setup.ts#L36">test-helpers/setup.ts:36</a></li>
</ul>
</aside>
</section>
Expand All @@ -118,7 +118,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> schema</h3>
<div class="tsd-signature tsd-kind-icon">schema<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/test-helpers/setup.ts#L34">test-helpers/setup.ts:34</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/test-helpers/setup.ts#L34">test-helpers/setup.ts:34</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -204,7 +204,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> schema</h3>
<a href="../modules/testhelpers.html#xsetupfortest" class="tsd-kind-icon">x<wbr>Setup<wbr>For<wbr>Test</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/testhelpers.html#xsetupwithschemadatanowtxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Now<wbr>Txn</a>
<a href="../modules/testhelpers.html#xsetupwithschemadatacommittxn" class="tsd-kind-icon">x<wbr>Setup<wbr>With<wbr>Schema<wbr>Data<wbr>Commit<wbr>Txn</a>
</li>
</ul>
</nav>
Expand Down
12 changes: 6 additions & 6 deletions docs/interfaces/upsert.inodefoundfunction.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3>existing<wbr>Uid</h3>
<div class="tsd-signature tsd-kind-icon">existing<wbr>Uid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/upsert/upsert.ts#L10">upsert/upsert.ts:10</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/upsert/upsert.ts#L10">upsert/upsert.ts:10</a></li>
</ul>
</aside>
</section>
Expand All @@ -107,7 +107,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> new<wbr>Node<wbr>Fn</
<div class="tsd-signature tsd-kind-icon">new<wbr>Node<wbr>Fn<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/133dbda/src/upsert/upsert.ts#L11">upsert/upsert.ts:11</a></li>
<li>Defined in <a href="https://github.com/vespertilian/dgraph-js-extras/blob/5c6b40c/src/upsert/upsert.ts#L11">upsert/upsert.ts:11</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
Expand Down Expand Up @@ -201,21 +201,21 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</s
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#basicequalityupsertfn" class="tsd-kind-icon">basic<wbr>Equality<wbr>Upsert<wbr>Fn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertcommittxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Commit<wbr>Txn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertedgelist" class="tsd-kind-icon">x<wbr>Upsert<wbr>Edge<wbr>List</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertedgelistcommittxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Edge<wbr>List<wbr>Commit<wbr>Txn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertmaptxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Map<wbr>Txn</a>
<a href="../modules/upsert.html#xupsertmapcommittxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Map<wbr>Commit<wbr>Txn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertobject" class="tsd-kind-icon">x<wbr>Upsert<wbr>Object</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupserttxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Txn</a>
</li>
</ul>
</nav>
</div>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/upsert.iobjectmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,21 @@ <h3 class="tsd-before-signature">Indexable</h3>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#basicequalityupsertfn" class="tsd-kind-icon">basic<wbr>Equality<wbr>Upsert<wbr>Fn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertcommittxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Commit<wbr>Txn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertedgelist" class="tsd-kind-icon">x<wbr>Upsert<wbr>Edge<wbr>List</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertedgelistcommittxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Edge<wbr>List<wbr>Commit<wbr>Txn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertmaptxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Map<wbr>Txn</a>
<a href="../modules/upsert.html#xupsertmapcommittxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Map<wbr>Commit<wbr>Txn</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupsertobject" class="tsd-kind-icon">x<wbr>Upsert<wbr>Object</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module">
<a href="../modules/upsert.html#xupserttxn" class="tsd-kind-icon">x<wbr>Upsert<wbr>Txn</a>
</li>
</ul>
</nav>
</div>
Expand Down

0 comments on commit 2f66e99

Please sign in to comment.