lib/client
DgraphClientError
継承
コンストラクタ
new DgraphClientError(errors, query, variables)
new DgraphClientError(
errors,
query,
variables): DgraphClientError
パラメータ
パラメータ | 型 |
---|---|
エラー | any [] |
query | string |
variables | any |
戻り値
オーバーライド
Error.constructor
プロパティ
message
message: string;
継承元
Error.message
name
name: string = "DgraphClientError";
オーバーライド
Error.name
stack?
optional stack: string;
継承元
Error.stack
prepareStackTrace()?
static optional prepareStackTrace: (err, stackTraces) => any;
スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド
参照
https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces
パラメータ
パラメータ | 型 |
---|---|
err | Error |
stackTraces | CallSite [] |
戻り値
any
継承元
Error.prepareStackTrace
stackTraceLimit
static stackTraceLimit: number;
継承元
Error.stackTraceLimit
メソッド
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void
ターゲットオブジェクトに.stackプロパティを作成します
パラメータ
パラメータ | 型 |
---|---|
targetObject | object |
constructorOpt ? | Function |
戻り値
void
継承元
Error.captureStackTrace
DgraphClientParams
プロパティ
authHeader?
optional authHeader: string;
デフォルト
"Authorization"
[Using JWT and authorization claims](https://dgraph.io/docs/graphql/authorization/authorization-overview#using-jwts-and-authorization-claims)
authToken
authToken: string;
X-Auth-Token
ヘッダー値
endpoint
endpoint: string;
jwtAlgorithm?
optional jwtAlgorithm: "HS256" | "RS256";
デフォルト
"RS256"
[Using JWT and authorization claims](https://dgraph.io/docs/graphql/authorization/authorization-overview#using-jwts-and-authorization-claims)
jwtSecret?
optional jwtSecret: string;
client()
client(params): {
run: Promise<null | T>;
}
パラメータ
パラメータ | 型 |
---|---|
params | DgraphClientParams |
戻り値
{
run: Promise<null | T>;
}
run()
型パラメータ
型パラメータ |
---|
T |
パラメータ
パラメータ | 型 |
---|---|
query | string |
variables ? | Record <string , any > |
戻り値
Promise
<null
| T
>