Merge client into next (#1709)

* Merge client
* Add linting script
* Rename serve to start:development
* Move error harmonization and handling to network layer
* Show Comment Stream
* Added initial test
This commit is contained in:
Kiwi
2018-06-27 22:06:30 +00:00
committed by Wyatt Johnson
parent 68794d5919
commit 65c8da0f34
122 changed files with 21057 additions and 42 deletions
@@ -1,7 +1,6 @@
import DataLoader from "dataloader";
import Context from "talk-server/graph/tenant/context";
import {
Comment,
ConnectionInput,
retrieveAssetConnection,
retrieveMany,
@@ -5,4 +5,6 @@ import { ConnectionInput } from "talk-server/models/comment";
export default {
comments: async (asset: Asset, input: ConnectionInput, ctx: Context) =>
ctx.loaders.Comments.forAsset(asset.id, input),
// TODO: implement this.
isClosed: () => false,
};
@@ -1,10 +1,9 @@
import TenantContext from "talk-server/graph/tenant/context";
import { Asset } from "talk-server/models/asset";
export default {
asset: async (
source: void,
{ id, url }: { id: string; url: string },
{ id }: { id: string; url: string },
ctx: TenantContext
) => ctx.loaders.Assets.asset.load(id),
settings: async (parent: any, args: any, ctx: TenantContext) => ctx.tenant,
@@ -242,12 +242,12 @@ type CommentEdge {
"""
node is the Comment for this edge.
"""
node: Comment
node: Comment!
"""
"""
cursor: Cursor
cursor: Cursor!
}
"""
@@ -332,12 +332,12 @@ type AssetEdge {
"""
node is the Asset for this edge.
"""
node: Asset
node: Asset!
"""
"""
cursor: Cursor
cursor: Cursor!
}
"""