34 lines
584 B
JavaScript
34 lines
584 B
JavaScript
import { gql } from '@apollo/client'
|
|
|
|
export const VAULT_ENTRY_FIELDS = gql`
|
|
fragment VaultEntryFields on VaultEntry {
|
|
id
|
|
key
|
|
iv
|
|
value
|
|
createdAt
|
|
updatedAt
|
|
}
|
|
`
|
|
|
|
export const GET_VAULT_ENTRIES = gql`
|
|
${VAULT_ENTRY_FIELDS}
|
|
query GetVaultEntries {
|
|
getVaultEntries {
|
|
...VaultEntryFields
|
|
}
|
|
}
|
|
`
|
|
|
|
export const CLEAR_VAULT = gql`
|
|
mutation ClearVault {
|
|
clearVault
|
|
}
|
|
`
|
|
|
|
export const UPDATE_VAULT_KEY = gql`
|
|
mutation updateVaultKey($entries: [VaultEntryInput!]!, $hash: String!) {
|
|
updateVaultKey(entries: $entries, hash: $hash)
|
|
}
|
|
`
|