mirror of
https://github.com/wassname/talk.git
synced 2026-07-28 11:27:05 +08:00
added tenant + graph support
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import DataLoader from 'dataloader';
|
||||
import {
|
||||
Asset,
|
||||
retrieveMany as retrieveManyAssets,
|
||||
} from 'talk-server/models/asset';
|
||||
import Context from 'talk-server/graph/context';
|
||||
|
||||
const loadAssets = async (ctx: Context, ids: string[]): Promise<Array<Asset>> =>
|
||||
retrieveManyAssets(ctx.db, ids);
|
||||
|
||||
export default (ctx: Context) => ({
|
||||
asset: new DataLoader<string, Asset>(ids => loadAssets(ctx, ids)),
|
||||
});
|
||||
@@ -1,4 +0,0 @@
|
||||
import Asset from './asset';
|
||||
import Context from 'talk-server/graph/context';
|
||||
|
||||
export default (ctx: Context) => ({ Asset: Asset(ctx) });
|
||||
Reference in New Issue
Block a user