code: private function makeSchemaDef($def)
      {
          if (! $def) {
              throw new Error('def must be defined.');
          }
          switch ($def->kind) {
              case NodeKind::OBJECT_TYPE_DEFINITION:
                  return $this->makeTypeDef($def);
              case NodeKind::INTERFACE_TYPE_DEFINITION:
                  return $this->makeInterfaceDef($def);
              case NodeKind::ENUM_TYPE_DEFINITION:
                  return $this->makeEnumDef($def);
              case NodeKind::UNION_TYPE_DEFINITION:
                  return $this->makeUnionDef($def);
              case NodeKind::SCALAR_TYPE_DEFINITION:
                  return $this->makeScalarDef($def);
              case NodeKind::INPUT_OBJECT_TYPE_DEFINITION:
                  return $this->makeInputObjectDef($def);
              default:
                  throw new Error(sprintf('Type kind of %s not supported.', $def->kind));
          }
      }
docs: @param ObjectTypeDefinitionNode|InterfaceTypeDefinitionNode|EnumTypeDefinitionNode|ScalarTypeDefinitionNode|InputObjectTypeDefinitionNode|UnionTypeDefinitionNode $def
  
  @return CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType
  
  @throws Error