stacker.news/fragments/vault.js

44 lines
716 B
JavaScript
Raw Normal View History

import { gql } from '@apollo/client'
export const VAULT_FIELDS = gql`
fragment VaultFields on Vault {
id
key
value
createdAt
2024-10-23 00:53:56 +00:00
updatedAt
}
`
2024-10-23 00:53:56 +00:00
export const GET_VAULT_ENTRY = gql`
${VAULT_FIELDS}
query GetVaultEntry(
$key: String!
) {
2024-10-23 00:53:56 +00:00
getVaultEntry(key: $key) {
...VaultFields
}
}
`
2024-10-23 00:53:56 +00:00
export const GET_VAULT_ENTRIES = gql`
${VAULT_FIELDS}
2024-10-23 00:53:56 +00:00
query GetVaultEntries {
getVaultEntries {
...VaultFields
}
}
`
export const CLEAR_VAULT = gql`
mutation ClearVault {
clearVault
}
`
2024-10-23 00:53:56 +00:00
export const UPDATE_VAULT_KEY = gql`
mutation updateVaultKey($entries: [VaultEntryInput!]!, $hash: String!) {
updateVaultKey(entries: $entries, hash: $hash)
}
`