import { immutable } from '../../decorators';
import { ExpressionNode, LOGIC_TYPE } from '../LogicItem';
import { CallInterParam } from './CallInterParam';

/**
 * 数据查询
 * @TODO: 当前类目前主要用于生成文档
 */
export class CallGraphQL extends ExpressionNode {
    /**
     * 逻辑节点类型
     */
    @immutable()
    public readonly type: LOGIC_TYPE = LOGIC_TYPE.CallGraphQL;
    /**
     * Code
     */
    @immutable()
    public readonly schemaRef: string = undefined;
    /**
     * Code
     */
    @immutable()
    public readonly operationName: string = undefined;
    /**
     * 跳转页面参数
     */
    @immutable()
    public readonly params: Array<CallInterParam> = [];
    /**
     * 生成 JS 脚本
     */
    toScript() {
        return '';
    }
}
