• /
  • Log in
  • Free account

EntityStorageMutation

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

Usage

import { EntityStorageMutation } from 'nr1'

Examples

Props

actionTyperequiredenum

Type of action to perform.

<One of
EntityStorageMutation.ACTION_TYPE.DELETE_COLLECTION,
EntityStorageMutation.ACTION_TYPE.DELETE_DOCUMENT,
EntityStorageMutation.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.

entityGuidrequiredstring

GUID of the entity in which the collection is operated.

Methods

EntityStorageMutation.render

function () => undefined

EntityStorageMutation.mutate

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

function (
props: Object //

Object containing the mutation options. Any EntityStorageMutation 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.