提交 67187c38 编写于 作者: C Convly 提交者: Alexandre BODIN

Rename _type to type and type to nonRequiredType

Signed-off-by: NConvly <jean-sebastien.herbaux@epitech.eu>
上级 1103d965
......@@ -19,15 +19,15 @@ const { toSDL } = require('./schema-definitions');
*
* @returns {Boolean}
*/
const isPrimitiveType = _type => {
const type = nonRequired(_type);
const isPrimitiveType = type => {
const nonRequiredType = nonRequired(type);
return (
type === 'Int' ||
type === 'Float' ||
type === 'String' ||
type === 'Boolean' ||
type === 'DateTime' ||
type === 'JSON'
nonRequiredType === 'Int' ||
nonRequiredType === 'Float' ||
nonRequiredType === 'String' ||
nonRequiredType === 'Boolean' ||
nonRequiredType === 'DateTime' ||
nonRequiredType === 'JSON'
);
};
......@@ -59,9 +59,9 @@ const isNotOfTypeArray = type => {
/**
* Returns all fields of type Integer or float
*/
const isNumberType = _type => {
const type = nonRequired(_type);
return type === 'Int' || type === 'Float';
const isNumberType = type => {
const nonRequiredType = nonRequired(type);
return nonRequiredType === 'Int' || nonRequiredType === 'Float';
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册