diff --git a/examples/react-graphql/client/src/gql/mutations.ts b/examples/react-graphql/client/src/gql/mutations.ts index d60e962d5..d2f87d169 100644 --- a/examples/react-graphql/client/src/gql/mutations.ts +++ b/examples/react-graphql/client/src/gql/mutations.ts @@ -15,8 +15,8 @@ export const deleteIdentity = gql` ` export const signCredentialJwt = gql` - mutation signCredentialJwt($data: SignCredentialInput!) { - signCredentialJwt(data: $data) { + mutation signCredentialJwt($data: SignCredentialInput!, $save: Boolean) { + signCredentialJwt(data: $data, save: $save) { raw } } diff --git a/examples/react-graphql/client/src/gql/queries.ts b/examples/react-graphql/client/src/gql/queries.ts index 28a9b01e0..687f67de4 100644 --- a/examples/react-graphql/client/src/gql/queries.ts +++ b/examples/react-graphql/client/src/gql/queries.ts @@ -25,6 +25,31 @@ export const credential = gql` } ` +export const credentials = gql` + query credentials($subject: String!) { + credentials(input: { where: [{ column: subject, value: $subject }] }) { + hash + issuanceDate + expirationDate + claims { + type + value + isObj + } + issuer { + did + shortId: shortDid + profileImage: latestClaimValue(type: "profileImage") + } + subject { + did + shortId: shortDid + profileImage: latestClaimValue(type: "profileImage") + } + } + } +` + export const identity = gql` query identity($did: String!) { identity(did: $did) { diff --git a/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx b/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx index 4eb38cadf..3bf3fd07d 100644 --- a/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx +++ b/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx @@ -12,7 +12,7 @@ import { AppContext } from '../../context/AppProvider' const Component = () => { const history = useHistory() const { url } = useRouteMatch() - const [highlightedIdentity, highlightIdentity] = useState() + const [highlightedIdentity, highlightIdentity] = useState() const { appState, setDefaultDid } = useContext(AppContext) const { defaultDid } = appState const { data: managedIdentitiesData } = useQuery(queries.managedIdentities) diff --git a/examples/react-graphql/client/src/views/Issue/Issue.tsx b/examples/react-graphql/client/src/views/Issue/Issue.tsx index 2c1e31780..4ee8bb7f4 100644 --- a/examples/react-graphql/client/src/views/Issue/Issue.tsx +++ b/examples/react-graphql/client/src/views/Issue/Issue.tsx @@ -46,9 +46,9 @@ const Component = () => { type: ['VerifiableCredential'], credentialSubject, }, + save: true, }, }) - console.log(data) setSignedVC(data.signCredentialJwt.raw) } catch (e) {} }