Skip to content

Commit

Permalink
fix: GQL export
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Mar 2, 2020
1 parent 066070e commit 63b9c23
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 9 deletions.
4 changes: 4 additions & 0 deletions packages/daf-did-comm/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ export const typeDefs = `
actionSendJwt(from: String!, to: String!, jwt: String!): Boolean
}
`
export default {
resolvers,
typeDefs,
}
2 changes: 1 addition & 1 deletion packages/daf-did-comm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { ActionHandler, ActionSendJWT, ActionTypes } from './action-handler'
export { MessageValidator } from './message-validator'
import * as Gql from './graphql'
import Gql from './graphql'
export { Gql }
4 changes: 4 additions & 0 deletions packages/daf-selective-disclosure/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ export const typeDefs = `
actionSignSDR(did: String!, data: SDRInput!): String
}
`
export default {
typeDefs,
resolvers,
}
2 changes: 1 addition & 1 deletion packages/daf-selective-disclosure/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { MessageValidator, MessageTypes } from './message-validator'
export { ActionHandler, ActionTypes, ActionSignSdr, SDRInput, CredentialRequestInput } from './action-handler'
import * as Gql from './graphql'
import Gql from './graphql'
export { Gql }
4 changes: 4 additions & 0 deletions packages/daf-trust-graph/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ export const typeDefs = `
actionSendJwt(from: String!, to: String!, jwt: String!): Boolean
}
`
export default {
resolvers,
typeDefs,
}
2 changes: 1 addition & 1 deletion packages/daf-trust-graph/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { ServiceController } from './service-controller'
export { ActionHandler, ActionSendJWT, ActionTypes } from './action-handler'
import * as Gql from './graphql'
import Gql from './graphql'
export { Gql }
6 changes: 6 additions & 0 deletions packages/daf-trust-graph/src/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@ export const edgeAdded = gql`
}
}
`
export default {
addEdge,
edgeAdded,
findEdges,
edgeByHash,
}
10 changes: 5 additions & 5 deletions packages/daf-trust-graph/src/service-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { createJWT } from 'did-jwt'
import { SubscriptionClient } from 'subscriptions-transport-ws'

import { AbstractServiceController, ServiceEventTypes, AbstractIdentity, Resolver } from 'daf-core'
import * as queries from './queries'
import * as Daf from 'daf-core'
import queries from './queries'
import { Message } from 'daf-core'

import Debug from 'debug'
const debug = Debug('daf:trust-graph:service-controller')
Expand Down Expand Up @@ -131,11 +131,11 @@ export class ServiceController extends AbstractServiceController {
},
})

const messages: Daf.Message[] = []
const messages: Message[] = []

for (const edge of data.findEdges) {
messages.push(
new Daf.Message({
new Message({
raw: edge.jwt,
meta: {
type: this.instanceId().type,
Expand Down Expand Up @@ -167,7 +167,7 @@ export class ServiceController extends AbstractServiceController {
.subscribe({
async next(result) {
emit(ServiceEventTypes.NewMessages, [
new Daf.Message({
new Message({
raw: result.data.edgeAdded.jwt,
meta: { type, id: uri },
}),
Expand Down
4 changes: 4 additions & 0 deletions packages/daf-w3c/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,7 @@ export const typeDefs = `
actionSignVp(did: String!, data: VerifiablePresentationInput!): String
}
`
export default {
resolvers,
typeDefs,
}
2 changes: 1 addition & 1 deletion packages/daf-w3c/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { MessageValidator, MessageTypes } from './message-validator'
export { ActionHandler, ActionTypes, ActionSignW3cVp, ActionSignW3cVc } from './action-handler'
import * as Gql from './graphql'
import Gql from './graphql'
export { Gql }

0 comments on commit 63b9c23

Please sign in to comment.