@__path/graph 中文文档教程
Installation
导航到您的项目文件夹后,运行:
$ yarn add @__path/graph
或:
$ npm install @__path/graph --save
用法示例:
import { Graph } from "@__path/graph";
let graph = new Graph("/graph-path"); //the root instance
let Author = new Graph()
.Service("Author") //service can created using "./__path create controller <ServiceName> --graph"
.fetchAll("name"); //column to fetch, can be Graph.Column('name')
let posts = graph.Service("Blog").fetchAll(
Graph.Column("title"),
Graph.Column("author_id"),
Author.As("author"), //fetch Author instance(Service) as author(key)
Graph.Column("body")
);
posts.get().then((res) => console.log(res));
/*
* [
{
"title": "Hello title",
"author_id": 1,
"author": {
"name": "Adewale"
}
}
]
* */
Installation
After navigating into your project folder, Run:
$ yarn add @__path/graph
or:
$ npm install @__path/graph --save
Usage Example:
import { Graph } from "@__path/graph";
let graph = new Graph("/graph-path"); //the root instance
let Author = new Graph()
.Service("Author") //service can created using "./__path create controller <ServiceName> --graph"
.fetchAll("name"); //column to fetch, can be Graph.Column('name')
let posts = graph.Service("Blog").fetchAll(
Graph.Column("title"),
Graph.Column("author_id"),
Author.As("author"), //fetch Author instance(Service) as author(key)
Graph.Column("body")
);
posts.get().then((res) => console.log(res));
/*
* [
{
"title": "Hello title",
"author_id": 1,
"author": {
"name": "Adewale"
}
}
]
* */
更多
你可能也喜欢
- @01ht/ht-date 中文文档教程
- @0x77/ccpack 中文文档教程
- @0xcda7a/path-to-regexp-es6 中文文档教程
- @2012mjm/sails-db-migrate 中文文档教程
- @99xt/react-fileupload 中文文档教程
- @aaa-backend-stack/tslint-rules 中文文档教程
- @aarnet/jupyterlab-ext-aarnet-help 中文文档教程
- @abegalinov/backoffice-skeleton 中文文档教程
- @abetomo/mask-value 中文文档教程
- @abouroubi/azure-database 中文文档教程