Skip to main content

Class: WorkflowQuery

query.v1.WorkflowQuery

See https://docs.temporal.io/docs/concepts/queries/

Properties

Optional header: null | $Properties

Headers that were passed by the caller of the query and copied by temporal server into the workflow task.


queryArgs

Optional queryArgs: null | $Properties

Serialized arguments that will be provided to the query handler.


queryType

queryType: string

The workflow-author-defined identifier of the query. Typically a function name.

Methods

toJSON

toJSON(): Object

Converts this WorkflowQuery to JSON.

Returns

Object

JSON object


create

create(properties?): WorkflowQuery & $Properties

Creates a new WorkflowQuery instance using the specified properties.

Parameters

NameTypeDescription
properties?$PropertiesProperties to set

Returns

WorkflowQuery & $Properties

WorkflowQuery instance

create(properties?): WorkflowQuery

Parameters

NameType
properties?$Properties

Returns

WorkflowQuery


decode

decode(reader, length?): WorkflowQuery & $Properties

Decodes a WorkflowQuery message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

WorkflowQuery & $Properties

WorkflowQuery

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): WorkflowQuery & $Properties

Decodes a WorkflowQuery message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

WorkflowQuery & $Properties

WorkflowQuery

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified WorkflowQuery message. Does not implicitly temporal.api.query.v1.WorkflowQuery.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesWorkflowQuery message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified WorkflowQuery message, length delimited. Does not implicitly temporal.api.query.v1.WorkflowQuery.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesWorkflowQuery message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): WorkflowQuery

Creates a WorkflowQuery message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

WorkflowQuery

WorkflowQuery


toObject

toObject(message, options?): Object

Creates a plain object from a WorkflowQuery message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageWorkflowQueryWorkflowQuery
options?IConversionOptionsConversion options

Returns

Object

Plain object