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 f8051c5 commit eacc969
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 94 deletions.
3 changes: 2 additions & 1 deletion .pretterignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
examples/
build/**/*
readme.md
readme.md
docs/api/
76 changes: 76 additions & 0 deletions docs/api/daf-data-store.gql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [daf-data-store](./daf-data-store.md) &gt; [Gql](./daf-data-store.gql.md)

## Gql variable

<b>Signature:</b>

```typescript
_default: {
resolvers: {
Message: {
vc: (message: any, {}: {}, { dataStore }: Context) => Promise<any>;
metaData: (message: any, {}: {}, { dataStore }: Context) => Promise<any>;
thread: (message: any, {}: {}, { dataStore }: Context) => Promise<any>;
};
VerifiableClaim: {
fields: (vc: any, {}: {}, { dataStore }: Context) => Promise<any>;
inMessages: (vc: any, {}: {}, { dataStore }: Context) => Promise<any>;
};
Identity: {
shortId: (identity: any, {}: {}, { dataStore }: Context) => Promise<any>;
firstName: (identity: any, {}: {}, { dataStore }: Context) => Promise<any>;
lastName: (identity: any, {}: {}, { dataStore }: Context) => Promise<any>;
profileImage: (identity: any, {}: {}, { dataStore }: Context) => Promise<string>;
url: (identity: any, {}: {}, { dataStore }: Context) => Promise<any>;
description: (identity: any, {}: {}, { dataStore }: Context) => Promise<any>;
interactionCount: (identity: any, { did }: {
did: string;
}, { dataStore }: Context) => Promise<any>;
credentialsIssued: (identity: any, args: any, { dataStore }: Context) => Promise<any>;
credentialsReceived: (identity: any, args: any, { dataStore }: Context) => Promise<any>;
credentialsAll: (identity: any, args: any, { dataStore }: Context) => Promise<any>;
messagesSent: (identity: any, args: any, { dataStore }: Context) => Promise<any>;
messagesReceived: (identity: any, args: any, { dataStore }: Context) => Promise<any>;
messagesAll: (identity: any, args: any, { dataStore }: Context) => Promise<any>;
};
Query: {
identity: (_: any, { did }: {
did: string;
}, { dataStore }: Context) => Promise<{
did: string;
}>;
identities: (_: any, { dids }: {
dids: string[];
}, { dataStore }: Context) => Promise<{
did: string;
}[] | {
did: any;
}[]>;
messages: (_: any, { sender, receiver, threadId, limit, }: {
sender: string;
receiver: string;
threadId: string;
limit: number;
}, { dataStore }: Context) => Promise<any>;
message: (_: any, { id }: {
id: string;
}, { dataStore }: Context) => Promise<any>;
credentials: (_: any, { iss, sub }: {
iss: string;
sub: string;
}, { dataStore }: Context) => Promise<any>;
credential: (_: any, { id }: {
id: string;
}, { dataStore }: Context) => Promise<any>;
};
Mutation: {
deleteMessage: (_: any, { id }: {
id: string;
}, { dataStore }: Context) => Promise<any>;
};
};
typeDefs: string;
}
```
7 changes: 3 additions & 4 deletions docs/api/daf-data-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

## Variables

| Variable | Description |
| ------------------------------------------ | ----------- |
| [resolvers](./daf-data-store.resolvers.md) | |
| [typeDefs](./daf-data-store.typedefs.md) | |
| Variable | Description |
| ------------------------------ | ----------- |
| [Gql](./daf-data-store.gql.md) | |
73 changes: 0 additions & 73 deletions docs/api/daf-data-store.resolvers.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/api/daf-data-store.typedefs.md

This file was deleted.

6 changes: 3 additions & 3 deletions packages/daf-cli/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as Daf from 'daf-core'
import * as W3c from 'daf-w3c'
import * as TG from 'daf-trust-graph'
import * as SRD from 'daf-selective-disclosure'
import { resolvers, typeDefs } from 'daf-data-store'
import { Gql as DataGql } from 'daf-data-store'
import merge from 'lodash.merge'
import { core, dataStore } from './setup'
import { listen } from './services'
Expand All @@ -20,15 +20,15 @@ program
Daf.Gql.baseTypeDefs,
Daf.Gql.Core.typeDefs,
Daf.Gql.IdentityManager.typeDefs,
typeDefs,
DataGql.typeDefs,
TG.Gql.typeDefs,
W3c.Gql.typeDefs,
SRD.Gql.typeDefs,
],
resolvers: merge(
Daf.Gql.Core.resolvers,
Daf.Gql.IdentityManager.resolvers,
resolvers,
DataGql.resolvers,
TG.Gql.resolvers,
W3c.Gql.resolvers,
SRD.Gql.resolvers,
Expand Down
4 changes: 4 additions & 0 deletions packages/daf-data-store/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,7 @@ export const typeDefs = `
}
`
export default {
resolvers,
typeDefs,
}
3 changes: 2 additions & 1 deletion packages/daf-data-store/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { DataStore } from './data-store'
export { resolvers, typeDefs } from './graphql'
export { DbDriver, Migration, Identity, VerifiableClaim, VerifiableClaimField } from './types'
import Gql from './graphql'
export { Gql }

0 comments on commit eacc969

Please sign in to comment.