mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 10:44:28 +11:00
Implemented update
This commit is contained in:
@@ -91,8 +91,21 @@ const readBlock = (tokens, current, superType, typeGraph, options) => {
|
||||
|
||||
//insert the block-level modifier signal
|
||||
if (modifier) {
|
||||
result[fieldName][modifier] = tokens[current++];
|
||||
//handle integers and floats exposed to the user
|
||||
switch(result[fieldName].typeName) {
|
||||
case 'Integer':
|
||||
result[fieldName][modifier] = parseInt(tokens[current++]);
|
||||
break;
|
||||
|
||||
case 'Float':
|
||||
result[fieldName][modifier] = parseFloat(tokens[current++]);
|
||||
break;
|
||||
|
||||
default: //everything else is a string (including booleans)
|
||||
result[fieldName][modifier] = tokens[current++];
|
||||
}
|
||||
}
|
||||
//no else-clause, since queries don't require modifiers
|
||||
|
||||
if (options.debug) {
|
||||
console.log(`${fieldName}: `, result[fieldName]);
|
||||
|
||||
Reference in New Issue
Block a user