Comparing version 0.0.20 to 0.0.21
@@ -9,6 +9,8 @@ import { Core } from './core'; | ||
raw: string; | ||
sourceType: string; | ||
sourceId?: string | undefined; | ||
}, ctx: Context) => Promise<import("./types").ValidatedMessage | null>; | ||
}; | ||
}; | ||
export declare const typeDefs = "\n extend type Mutation {\n newMessage(raw: String): Message\n }\n"; | ||
export declare const typeDefs = "\n extend type Mutation {\n newMessage(raw: String!, sourceType: String!, sourceId: String): Message\n }\n"; | ||
export {}; |
@@ -42,3 +42,9 @@ "use strict"; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, ctx.core.onRawMessage({ raw: args.raw })]; | ||
case 0: return [4 /*yield*/, ctx.core.onRawMessage({ | ||
raw: args.raw, | ||
meta: [{ | ||
sourceType: args.sourceType, | ||
sourceId: args.sourceId | ||
}] | ||
})]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
@@ -53,3 +59,3 @@ } | ||
}; | ||
exports.typeDefs = "\n extend type Mutation {\n newMessage(raw: String): Message\n }\n"; | ||
exports.typeDefs = "\n extend type Mutation {\n newMessage(raw: String!, sourceType: String!, sourceId: String): Message\n }\n"; | ||
//# sourceMappingURL=graphql-core.js.map |
{ | ||
"name": "daf-core", | ||
"description": "DID Agent Framework Core", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"main": "build/index.js", | ||
@@ -31,3 +31,3 @@ "types": "build/index.d.ts", | ||
"keywords": [], | ||
"gitHead": "e88166588a65afd1f1980a654e49dd19adb302bf" | ||
"gitHead": "4e35414ce4b53b156bb1d9e37e582ca7bb474378" | ||
} |
@@ -7,4 +7,10 @@ import { Core } from './core' | ||
const newMessage = async (_: any, args: { raw: string }, ctx: Context) => { | ||
return await ctx.core.onRawMessage({ raw: args.raw }) | ||
const newMessage = async (_: any, args: { raw: string, sourceType: string, sourceId?: string }, ctx: Context) => { | ||
return await ctx.core.onRawMessage({ | ||
raw: args.raw, | ||
meta: [{ | ||
sourceType: args.sourceType, | ||
sourceId: args.sourceId | ||
}] | ||
}) | ||
} | ||
@@ -20,4 +26,4 @@ | ||
extend type Mutation { | ||
newMessage(raw: String): Message | ||
newMessage(raw: String!, sourceType: String!, sourceId: String): Message | ||
} | ||
` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97079
1761