src/schema/utils/index.js
function getRemoteMethodInput(method, isConnection = false) {
    const acceptingParams = {};

    method.accepts.forEach((param) => {
        let paramType = '';
        if (typeof param.type === 'object') {
            paramType = 'JSON';
        } else if (!SCALARS[param.type.toLowerCase()]) {
            paramType = `${param.type}Input`;
        } else {
            paramType = _.upperFirst(param.type);
        }
        if (param.arg) {
            acceptingParams[param.arg] = {
                type: getType(exchangeTypes[paramType] || paramType)
            };
        }
    });

    return (isConnection) ? Object.assign({}, acceptingParams, connectionArgs) : acceptingParams;
}
function getRemoteMethodInput(method, isConnection = false) {
    const acceptingParams = {};

    method.accepts.forEach((param) => {
        let paramType = '';
        if (typeof param.type === 'object') {
            paramType = 'JSON';
        } else if (!SCALARS[param.type.toLowerCase()]) {
            paramType = `${param.type}Input`;
        } else {
            paramType = _.upperFirst(param.type);
        }
        if (param.arg) {
            acceptingParams[param.arg] = {
                type: getType(exchangeTypes[paramType] || paramType)
            };
        }
    });

    return (isConnection) ? Object.assign({}, acceptingParams, connectionArgs) : acceptingParams;
}
function getRemoteMethodInput ( method , isConnection = false ) { const acceptingParams = { } ; method . accepts . forEach ( ( param ) => { let paramType = '' ; if ( typeof param . type === 'object' ) { paramType = 'JSON' ; } else if ( ! SCALARS [ param . type . toLowerCase ( ) ] ) { paramType = ` ${ param . type } ` ; } else { paramType = _ . upperFirst ( param . type ) ; } if ( param . arg ) { acceptingParams [ param . arg ] = { type : getType ( exchangeTypes [ paramType ] || paramType ) } ; } } ) ; return ( isConnection ) ? Object . assign ( { } , acceptingParams , connectionArgs ) : acceptingParams ; }
Extracts query params from a remote method
@param {*} method
Extracts query params from a remote method