src/index.js
/**
 * Construct a GraphQL operation execution result message.
 * @constructor
 * @augments OperationMessageFromServer
 * @param {string} id - Operation identifier
 * @param {object} payload - Execution result
 * @returns {DataMessage}
*/
Construct a GraphQL operation execution result message.
Construct a GraphQL operation execution result message .
function DataMessage(id, payload) {
    if (this instanceof DataMessage) {
        OperationMessageFromServer.call(this, "data");
        Object.defineProperty(this, "id", {
            enumerable: true,
            configurable: false,
            value: id
        });
        Object.defineProperty(this, "payload", {
            enumerable: true,
            configurable: false,
            value: payload
        });
    } else {
        return new DataMessage(id, payload);
    }
}
function DataMessage ( id , payload ) { if ( this instanceof DataMessage ) { OperationMessageFromServer . call ( this , "data" ) ; Object . defineProperty ( this , "id" , { enumerable : true , configurable : false , value : id } ) ; Object . defineProperty ( this , "payload" , { enumerable : true , configurable : false , value : payload } ) ; } else { return new DataMessage ( id , payload ) ; } }
Construct a GraphQL operation execution result message.
Construct a GraphQL operation execution result message .