Comparing version
import { Core } from '../core'; | ||
import { LastMessageTimestampForInstance } from '../service/service-manager'; | ||
import { Message } from '../message/message'; | ||
export interface Context { | ||
@@ -29,3 +28,12 @@ core: Core; | ||
sourceId?: string | undefined; | ||
}, ctx: Context) => Promise<Message>; | ||
}, ctx: Context) => Promise<{ | ||
data: string; | ||
id: any; | ||
type: string | null; | ||
threadId: string | null; | ||
sender: string | null; | ||
receiver: string | null; | ||
timestamp: number | null; | ||
vc?: any; | ||
}>; | ||
}; | ||
@@ -32,0 +40,0 @@ }; |
@@ -52,2 +52,3 @@ "use strict"; | ||
var newMessage = function (_, args, ctx) { return __awaiter(void 0, void 0, void 0, function () { | ||
var message, res; | ||
return __generator(this, function (_a) { | ||
@@ -62,3 +63,6 @@ switch (_a.label) { | ||
}))]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
case 1: | ||
message = _a.sent(); | ||
res = __assign(__assign({}, message), { data: JSON.stringify(message.data), id: message.id }); | ||
return [2 /*return*/, res]; | ||
} | ||
@@ -65,0 +69,0 @@ }); |
@@ -26,3 +26,12 @@ declare const Gql: { | ||
sourceId?: string | undefined; | ||
}, ctx: import("./graphql-core").Context) => Promise<import("..").Message>; | ||
}, ctx: import("./graphql-core").Context) => Promise<{ | ||
data: string; | ||
id: any; | ||
type: string | null; | ||
threadId: string | null; | ||
sender: string | null; | ||
receiver: string | null; | ||
timestamp: number | null; | ||
vc?: any; | ||
}>; | ||
}; | ||
@@ -29,0 +38,0 @@ }; |
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.3.19](https://github.com/uport-project/daf/compare/v2.3.18...v2.3.19) (2020-03-11) | ||
### Bug Fixes | ||
* GQL newMessage data field ([48181b9](https://github.com/uport-project/daf/commit/48181b93a5504e82373894598a81149f3c529a69)) | ||
## [2.3.18](https://github.com/uport-project/daf/compare/v2.3.17...v2.3.18) (2020-03-10) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "daf-core", | ||
"description": "DID Agent Framework Core", | ||
"version": "2.3.18", | ||
"version": "2.3.19", | ||
"main": "build/index.js", | ||
@@ -30,3 +30,3 @@ "types": "build/index.d.ts", | ||
"keywords": [], | ||
"gitHead": "e1cee0e6f2dbe8bb0967e71d7f3156926b6be910" | ||
"gitHead": "565668bd9da0fa7ec3a07c046cd4cdfb32b3c223" | ||
} |
@@ -15,3 +15,3 @@ import { Core } from '../core' | ||
) => { | ||
return await ctx.core.validateMessage( | ||
const message = await ctx.core.validateMessage( | ||
new Message({ | ||
@@ -25,2 +25,9 @@ raw: args.raw, | ||
) | ||
const res = { | ||
...message, | ||
data: JSON.stringify(message.data), | ||
id: message.id, | ||
} | ||
return res | ||
} | ||
@@ -27,0 +34,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
159410
0.74%2553
1.07%