From 59afebcea28f4bca6c7f407b7a58d3ba5d581c2c Mon Sep 17 00:00:00 2001 From: Alexey Rodionov Date: Fri, 31 Jan 2020 10:22:23 +0300 Subject: [PATCH] Add support of HexColorCode and Date custom scalars --- src/Explorer.js | 76 +++++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/src/Explorer.js b/src/Explorer.js index ea2ed42..a4fcf48 100644 --- a/src/Explorer.js +++ b/src/Explorer.js @@ -737,34 +737,54 @@ class AbstractArgView extends React.PureComponent { ); } else if (isScalarType(argType)) { - if (argType.name === 'Boolean') { - input = ( - - ); - } else { - input = ( - - ); + switch (argType.name) { + case 'Boolean': + input = ( + + ); + break; + case 'HexColorCode': + input = ( + + ); + break; + case 'Date': + input = ( + + ); + break; + default: + input = ( + + ); } } else if (isEnumType(argType)) { if (argValue.kind === 'EnumValue') {