new StartMessage(id, query, variablesopt, operationNameopt) → {StartMessage}
Construct a GraphQL communication initialization message.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string | Operation identifier | |
query |
string | Operation | |
variables |
object |
<optional> |
Variables |
operationName |
string |
<optional> |
Operation name |
Throws:
-
Throws a type error if any of the provided arguments are invalid.
- Type
- TypeError
Returns:
- Type
- StartMessage