Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions lib/client.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"
import * as messages from "../generated/api_pb"
import { DgraphClientStub } from "./clientStub"
Expand Down
5 changes: 5 additions & 0 deletions lib/client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
var __awaiter =
(this && this.__awaiter) ||
Expand Down
5 changes: 5 additions & 0 deletions lib/clientStub.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"
import * as messages from "../generated/api_pb"
export declare class DgraphClientStub {
Expand Down
5 changes: 5 additions & 0 deletions lib/clientStub.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
var __awaiter =
(this && this.__awaiter) ||
Expand Down
5 changes: 5 additions & 0 deletions lib/clientStubFromSlash.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import { DgraphClientStub } from "./clientStub"
export declare function clientStubFromSlashGraphQLEndpoint(
graphqlEndpoint: string,
Expand Down
5 changes: 5 additions & 0 deletions lib/clientStubFromSlash.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.clientStubFromSlashGraphQLEndpoint = clientStubFromSlashGraphQLEndpoint
Expand Down
5 changes: 5 additions & 0 deletions lib/dgraph.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

export * from "./types"
export {
Operation,
Expand Down
5 changes: 5 additions & 0 deletions lib/dgraph.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
var __createBinding =
(this && this.__createBinding) ||
Expand Down
5 changes: 5 additions & 0 deletions lib/errors.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

export declare const ERR_NO_CLIENTS: Error
export declare const ERR_FINISHED: Error
export declare const ERR_ABORTED: Error
Expand Down
5 changes: 5 additions & 0 deletions lib/errors.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.ERR_REFRESH_JWT_EMPTY =
Expand Down
5 changes: 5 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "./dgraph"
export * from "./dgraph"
export default dgraph
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
var __createBinding =
(this && this.__createBinding) ||
Expand Down
5 changes: 5 additions & 0 deletions lib/txn.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"
import * as messages from "../generated/api_pb"
import { DgraphClient } from "./client"
Expand Down
5 changes: 5 additions & 0 deletions lib/txn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
var __assign =
(this && this.__assign) ||
Expand Down
5 changes: 5 additions & 0 deletions lib/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as messages from "../generated/api_pb"
export declare class Payload extends messages.Payload {
getData(): string | Uint8Array
Expand Down
5 changes: 5 additions & 0 deletions lib/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
var __extends =
(this && this.__extends) ||
Expand Down
5 changes: 5 additions & 0 deletions lib/util.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as jspb from "google-protobuf"
export declare function errorCode(err: any): {
valid: boolean
Expand Down
5 changes: 5 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.isBase64 = void 0
Expand Down
15 changes: 2 additions & 13 deletions protos/api.proto
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright (C) 2017 Dgraph Labs, Inc. and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

// Style guide for Protocol Buffer 3.
Expand Down
5 changes: 5 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"

import * as messages from "../generated/api_pb"
Expand Down
5 changes: 5 additions & 0 deletions src/clientStub.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"

import * as services from "../generated/api_grpc_pb"
Expand Down
5 changes: 5 additions & 0 deletions src/clientStubFromSlash.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"
import * as Url from "url-parse"
import { DgraphClientStub } from "./clientStub"
Expand Down
5 changes: 5 additions & 0 deletions src/dgraph.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

// Export all the required message types.
export * from "./types"
export {
Expand Down
5 changes: 5 additions & 0 deletions src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

export const ERR_NO_CLIENTS = new Error("No clients provided in DgraphClient constructor")
export const ERR_FINISHED = new Error("Transaction has already been committed or discarded")
export const ERR_ABORTED = new Error("Transaction has been aborted. Please retry")
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "./dgraph"

export * from "./dgraph"
Expand Down
5 changes: 5 additions & 0 deletions src/txn.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"

import * as messages from "../generated/api_pb"
Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as jspb from "google-protobuf"

import * as messages from "../generated/api_pb"
Expand Down
5 changes: 5 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"
import * as jspb from "google-protobuf"

Expand Down
5 changes: 5 additions & 0 deletions tests/client.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../src"

import { createClient, createClientStub } from "./helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/clientStub.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"

import * as dgraph from "../src"
Expand Down
5 changes: 5 additions & 0 deletions tests/helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as grpc from "@grpc/grpc-js"

import * as dgraph from "../src"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/acctUpsert.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/acl.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import { fail } from "assert"
import { exec } from "child_process"
import { promisify } from "util"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/bank.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"
import * as crypto from "crypto"
import { setSchema, setup, wait } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/bulkSetDelete.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/conditionalUpsert.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup, tryUpsert } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/conflict.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/delete.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/doRequest.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/mutate.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/typeSystem.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/upsert.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../../src"

import { setSchema, setup, tryUpsert } from "../helper"
Expand Down
5 changes: 5 additions & 0 deletions tests/txn.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © Hypermode Inc. <hello@hypermode.com>
* SPDX-License-Identifier: Apache-2.0
*/

import * as dgraph from "../src"

import { setSchema, setup } from "./helper"
Expand Down
Loading
Loading