-
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.
test: GraphQL integration tests passing
- Loading branch information
1 parent
967b916
commit 46fd3a2
Showing
3 changed files
with
108 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { IAgentGraphQLMethod } from '../types' | ||
|
||
export const dataStoreORMGetMessages: IAgentGraphQLMethod = { | ||
type: 'Query', | ||
query: ` | ||
query dataStoreORMGetMessages($where: [MessagesWhere], $order: [MessagesOrder], $take: Int, $skip: Int) { | ||
dataStoreORMGetMessages(where: $where, order: $order, take: $take, skip: $skip) { | ||
id | ||
createdAt | ||
expiresAt | ||
threadId | ||
type | ||
raw | ||
data | ||
replyTo | ||
replyUrl | ||
from | ||
to | ||
metaData { | ||
type | ||
value | ||
} | ||
} | ||
} | ||
`, | ||
typeDef: ` | ||
enum WhereOperation { | ||
Not | ||
LessThan | ||
LessThanOrEqual | ||
MoreThan | ||
MoreThanOrEqual | ||
Equal | ||
Like | ||
Between | ||
In | ||
Any | ||
IsNull | ||
} | ||
enum OrderDirection { | ||
ASC | ||
DESC | ||
} | ||
enum MessagesColumns { | ||
from | ||
to | ||
id | ||
createdAt | ||
expiresAt | ||
threadId | ||
type | ||
raw | ||
replyTo | ||
replyUrl | ||
} | ||
input MessagesWhere { | ||
column: MessagesColumns! | ||
value: [String] | ||
not: Boolean | ||
op: WhereOperation | ||
} | ||
input MessagesOrder { | ||
column: MessagesColumns! | ||
direction: OrderDirection! | ||
} | ||
extend type Query { | ||
dataStoreORMGetMessages(where: [MessagesWhere], order: [MessagesOrder], take: Int, skip: Int): [Message] | ||
} | ||
`, | ||
} | ||
|
||
export const supportedMethods: Record<string, IAgentGraphQLMethod> = { | ||
dataStoreORMGetMessages, | ||
} | ||
|
||
export default supportedMethods |
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,23 @@ | ||
import { IAgentGraphQLMethod } from '../types' | ||
|
||
export const getVerifiableCredentialsForSdr: IAgentGraphQLMethod = { | ||
type: 'Query', | ||
query: ` | ||
query getVerifiableCredentialsForSdr($sdr: SelectiveDisclosureRequest!, $did: String) { | ||
getVerifiableCredentialsForSdr(sdr: $sdr, did: $did) | ||
} | ||
`, | ||
typeDef: ` | ||
scalar SelectiveDisclosureRequest | ||
scalar CredentialsForSdr | ||
extend type Query { | ||
getVerifiableCredentialsForSdr(sdr: SelectiveDisclosureRequest!, did: String): [CredentialsForSdr] | ||
} | ||
`, | ||
} | ||
|
||
export const supportedMethods: Record<string, IAgentGraphQLMethod> = { | ||
getVerifiableCredentialsForSdr, | ||
} | ||
|
||
export default supportedMethods |