45 lines
761 B
JavaScript
Raw Normal View History

import { gql } from '@apollo/client'
2024-10-27 02:43:45 -05:00
export const VAULT_ENTRY_FIELDS = gql`
fragment VaultEntryFields on VaultEntry {
id
key
2024-10-27 02:43:45 -05:00
iv
value
createdAt
2024-10-22 19:53:56 -05:00
updatedAt
}
`
2024-10-22 19:53:56 -05:00
export const GET_VAULT_ENTRY = gql`
2024-10-27 02:43:45 -05:00
${VAULT_ENTRY_FIELDS}
query GetVaultEntry(
$key: String!
) {
2024-10-22 19:53:56 -05:00
getVaultEntry(key: $key) {
2024-10-27 02:43:45 -05:00
...VaultEntryFields
}
}
`
2024-10-22 19:53:56 -05:00
export const GET_VAULT_ENTRIES = gql`
2024-10-27 02:43:45 -05:00
${VAULT_ENTRY_FIELDS}
2024-10-22 19:53:56 -05:00
query GetVaultEntries {
getVaultEntries {
2024-10-27 02:43:45 -05:00
...VaultEntryFields
}
}
`
export const CLEAR_VAULT = gql`
mutation ClearVault {
clearVault
}
`
2024-10-22 19:53:56 -05:00
export const UPDATE_VAULT_KEY = gql`
mutation updateVaultKey($entries: [VaultEntryInput!]!, $hash: String!) {
updateVaultKey(entries: $entries, hash: $hash)
}
`