-
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
Jason Healy
committed
Jan 27, 2020
1 parent
5867c2d
commit d930b92
Showing
8 changed files
with
286 additions
and
13 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
17 changes: 17 additions & 0 deletions
17
examples/react-graphql/client/src/components/Request/Request.tsx
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,17 @@ | ||
import React from 'react' | ||
import { Box, Heading } from 'rimble-ui' | ||
import * as Types from '../../types' | ||
|
||
interface Props { | ||
sender: Types.Identity | ||
receiver: Types.Identity | ||
sdr: any | ||
} | ||
|
||
const Component: React.FC<Props> = ({ sdr }) => { | ||
console.log(sdr) | ||
|
||
return <Box>Show contents from query. Results are logged in console..</Box> | ||
} | ||
|
||
export default Component |
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,32 @@ | ||
import { gql } from 'apollo-boost' | ||
|
||
export const deleteIdentity = gql` | ||
mutation deleteIdentity($type: String, $did: String) { | ||
deleteIdentity(type: $type, did: $did) | ||
} | ||
` | ||
|
||
export const actionSignVc = gql` | ||
mutation actionSignVc($did: String!, $data: VerifiableCredentialInput!) { | ||
actionSignVc(did: $did, data: $data) | ||
} | ||
` | ||
|
||
export const actionSignSDR = gql` | ||
mutation signSDR($did: String!, $data: SDRInput!) { | ||
actionSignSDR(did: $did, data: $data) | ||
} | ||
` | ||
export const actionSendJwt = gql` | ||
mutation actionSendJwt($from: String!, $to: String!, $jwt: String!) { | ||
actionSendJwt(from: $from, to: $to, jwt: $jwt) | ||
} | ||
` | ||
|
||
export const createIdentity = gql` | ||
mutation createIdentity($type: String) { | ||
createIdentity(type: $type) { | ||
did | ||
} | ||
} | ||
` |
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,177 @@ | ||
import { gql } from 'apollo-boost' | ||
|
||
export const credential = gql` | ||
query credential($id: ID!) { | ||
credential(id: $id) { | ||
hash | ||
rowId | ||
iss { | ||
did | ||
shortId | ||
} | ||
sub { | ||
did | ||
shortId | ||
} | ||
jwt | ||
nbf | ||
iat | ||
fields { | ||
isObj | ||
type | ||
value | ||
} | ||
} | ||
} | ||
` | ||
|
||
export const identity = gql` | ||
query identity($did: ID!) { | ||
identity(did: $did) { | ||
did | ||
type | ||
shortId | ||
} | ||
} | ||
` | ||
|
||
export const managedIdentities = gql` | ||
query managedIdentities { | ||
managedIdentityTypes | ||
managedIdentities { | ||
did | ||
type | ||
shortId | ||
} | ||
} | ||
` | ||
|
||
export const queryMessage = gql` | ||
query message($id: ID!, $defaultDid: ID!) { | ||
message(id: $id) { | ||
id | ||
threadId | ||
type | ||
timestamp | ||
sdr(sub: $defaultDid) { | ||
iss { | ||
did { | ||
did | ||
shortId | ||
} | ||
url | ||
} | ||
claimType | ||
reason | ||
essential | ||
vc { | ||
hash | ||
rowId | ||
iss { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
sub { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
jwt | ||
fields { | ||
type | ||
value | ||
isObj | ||
} | ||
} | ||
} | ||
sender { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
} | ||
} | ||
` | ||
|
||
export const allMessages = gql` | ||
query allMessages($activeDid: ID!) { | ||
identity(did: $activeDid) { | ||
did | ||
messagesAll { | ||
id | ||
raw | ||
data | ||
threadId | ||
type | ||
timestamp | ||
sender { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
sdr(sub: $activeDid) { | ||
iss { | ||
did { | ||
did | ||
shortId | ||
} | ||
url | ||
} | ||
claimType | ||
reason | ||
essential | ||
vc { | ||
hash | ||
rowId | ||
iss { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
sub { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
jwt | ||
fields { | ||
type | ||
value | ||
isObj | ||
} | ||
} | ||
} | ||
receiver { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
vc { | ||
rowId | ||
hash | ||
iss { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
sub { | ||
did | ||
shortId | ||
profileImage | ||
} | ||
fields { | ||
type | ||
value | ||
isObj | ||
} | ||
} | ||
metaData { | ||
type | ||
id | ||
data | ||
} | ||
} | ||
} | ||
} | ||
` |
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
Oops, something went wrong.