src/type/type.js
function stringToGraphQLType(type) {
  switch (type) {
    case 'String':
      return GraphQLString;
    case 'Number':
      return GraphQLFloat;
    case 'Date':
      return GraphQLDate;
    case 'Buffer':
      return GraphQLBuffer;
    case 'Boolean':
      return GraphQLBoolean;
    case 'ObjectID':
      return GraphQLID;
    default:
      return GraphQLGeneric;
  }
}
function stringToGraphQLType(type) {
  switch (type) {
    case 'String':
      return GraphQLString;
    case 'Number':
      return GraphQLFloat;
    case 'Date':
      return GraphQLDate;
    case 'Buffer':
      return GraphQLBuffer;
    case 'Boolean':
      return GraphQLBoolean;
    case 'ObjectID':
      return GraphQLID;
    default:
      return GraphQLGeneric;
  }
}
function stringToGraphQLType ( type ) { switch ( type ) { case 'String' : return GraphQLString ; case 'Number' : return GraphQLFloat ; case 'Date' : return GraphQLDate ; case 'Buffer' : return GraphQLBuffer ; case 'Boolean' : return GraphQLBoolean ; case 'ObjectID' : return GraphQLID ; default : return GraphQLGeneric ; } }
Returns a GraphQL type based on a String representation
@param  {String} type
@return {GraphQLType}
Returns a GraphQL type based on a String representation