• /
  • Log in
  • Free account

AccountStorageMutation

Save, delete, or update an account scoped document in NerdStorage. In order to successfully perform this operation, the user must have the right permissions.

Usage

import { AccountStorageMutation } from 'nr1'

Examples

Props

accountIdrequirednumber

Account identifier.

actionTyperequiredenum

Type of action to perform.

<One of
AccountStorageMutation.ACTION_TYPE.DELETE_COLLECTION,
AccountStorageMutation.ACTION_TYPE.DELETE_DOCUMENT,
AccountStorageMutation.ACTION_TYPE.WRITE_DOCUMENT,
>
childrenrequiredfunction

Render prop function as children.

function (
mutate: function, //

Function to trigger a mutation from your UI.

mutationResult: {Object //

Results of the mutation.

) => undefined
collectionrequiredstring

Collection name.

documentobject

NerdStorage document. Documents are restricted to 64 kB in size when JSON-stringified.

documentIdstring

Document identifier to operate in. When omitted the whole collection is returned.

Methods

AccountStorageMutation.render

function () => undefined

AccountStorageMutation.mutate

Static method to use AccountStorageMutation as a Promise instead of as a React component.

function (
props: Object //

Object containing the mutation options. Any AccountStorageMutation prop is a valid option except children.

) => {Object}

Type definitions

PromiseQueryResult

{
loading: boolean, //

Indicates that the request is in flight.

data: Object, //

An object containing the result of your query.

}
Create issueEdit page
Copyright © 2021 New Relic Inc.