-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47cd3d3
commit 4ef9a15
Showing
4 changed files
with
87 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Core } from 'daf-core' | ||
import { ActionTypes } from './action-handler' | ||
|
||
interface Context { | ||
core: Core | ||
} | ||
|
||
const actionSendJwt = async ( | ||
_: any, | ||
args: { | ||
from: string | ||
to: string | ||
jwt: string | ||
}, | ||
ctx: Context, | ||
) => { | ||
return await ctx.core.handleAction({ | ||
type: ActionTypes.sendJwt, | ||
data: { | ||
from: args.from, | ||
to: args.to, | ||
jwt: args.jwt, | ||
}, | ||
}) | ||
} | ||
|
||
export const resolvers = { | ||
Mutation: { | ||
actionSendJwt, | ||
}, | ||
} | ||
|
||
export const typeDefs = ` | ||
extend type Mutation { | ||
actionSendJwt(from: String!, to: String!, jwt: String!): Boolean | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export { TrustGraphServiceController } from './service-controller' | ||
export { ActionHandler, ActionSendJWT, ActionTypes } from './action-handler' | ||
import * as Gql from './graphql' | ||
export { Gql } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters