
Security News
TC39 Advances Temporal to Stage 4 Alongside Several ECMAScript Proposals
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.
@result/hasura-parser
Advanced tools

An easy utility library for parsing data from Hasura events and actions.
Made with :heart: at RESULT d.o.o.
First install the package.
yarn add @result/hasura-parser
npm install @result/hasura-parser
To use the Action Parser you can either import ActionParser or require the whole package.
import { ActionParser } from '@result/hasura-parser'
// Data is from your request body
const actionParser = new ActionParser( data )
To get the data you need, just pass in the keys of the arguments you want:
const data = actionParser.getData( "id", "type", "user" )
This will give you the following response:
{
"id": <data>,
"type": <data>,
"user": null
}
If the value is not found a null will be returned in its place.
If you want to get all the data in its raw form, you can issue the following call:
const data = actionParser.getRawData()
This will give you all the values that were passed in by Hasura.
Single session variable:
const userId = actionParser.getSessionVariable( "x-hasura-user-id" )
This will either give you the value of the session variable or just null if it is not set.
All session variables:
const sessionVariables = actionParser.getSessionVariables()
Action name:
const sessionVariables = actionParser.getActionName()
To use the Events Parser you can either import EventParser or require the whole package.
import { EventParser } from '@result/hasura-parser'
// Data is from your request body
const eventParser = new EventParser( data )
To get the data you need, just pass in the keys of the arguments you want:
const data = eventParser.getData( "id", "type", "user" )
The response depends on the event type, if it is an INSERT, DELETE or MANUAL operation you will receive the following response:
{
"id": <data>,
"type": <data>,
"user": null
}
If the value is not found a null will be returned in its place.
If it is an UPDATE operation, the object will contain the old and new values:
{
"old": {
"id": <data>,
"type": <data>,
"user": null
},
"new": {
"id": <data>,
"type": <data>,
"user": null
}
}
If you want to get all the data in its raw form, you can issue the following calls:
const oldData = eventParser.getOldData()
const newData = eventParser.getNewData()
Depending on the event type, old or new can be null.
This will give you all the values that were passed in by Hasura.
Single session variable:
const userId = eventParser.getSessionVariable( "x-hasura-user-id" )
This will either give you the value of the session variable or just null if it is not set.
All session variables:
const sessionVariables = eventParser.getSessionVariables()
Get ID of event:
const eventID = eventParser.getID()
Get trigger name (set in Hasura Console):
const triggerName = eventParser.getTriggerName()
Get schema name (the name of the schema that was affected by the event):
const schemaName = eventParser.getSchemaName()
Get table name (name of affected table by the event):
const tableName = eventParser.getTableName()
Get current retries and max retries (if this is set in the event in Hasura):
const currentRetry = eventParser.getCurrentRetry()
const maxRetries = eventParser.getMaxRetries()
Operation type checking (INSERT, UPDATE, DELETE, MANUAL):
const isInsert = eventParser.isInsertOperation() // The following operations return a boolean value
const isUpdate = eventParser.isUpdateOperation()
const isDelete = eventParser.isDeleteOperation()
const isManual = eventParser.isManualOperation()
const operationType = eventParser.getOperationType() // Returns INSERT, UPDATE, DELETE or MANUAL
Timestamp of operation:
const timestamp = eventParser.getTimestamp()
Trace context:
const traceContextID = eventParser.getTraceContextID()
const traceContextSpanID = eventParser.getTraceContextSpanID()
If you would like to make any contribution you are welcome to do so.
FAQs
Helper module for Hasura actions and events.
The npm package @result/hasura-parser receives a total of 7 weekly downloads. As such, @result/hasura-parser popularity was classified as not popular.
We found that @result/hasura-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.

Research
/Security News
Since January 31, 2026, we identified at least 72 additional malicious Open VSX extensions, including transitive GlassWorm loader extensions targeting developers.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.