    if (scalarsNameValues.includes(typeName as any)) {
      return typeName
    }

    this.markTypeAsPublished(typeName)

    if (this.scalars[typeName]) {
      return this.scalars[typeName]
    }

    return Nexus.scalarType({
      name: typeName,
      serialize(value) {
        return value
      },
    })
  }

  protected publishEnum(typeName: string) {
    const dmmfEnum = this.dmmf.getEnumType(typeName)

    this.markTypeAsPublished(typeName)

    return Nexus.enumType({
      name: typeName,
      members: dmmfEnum.values,
    })
  }

  publishInputObjectType(inputType: DmmfTypes.InputType) {
    this.markTypeAsPublished(inputType.name)

    return Nexus.inputObjectType({
      name: inputType.name,
      definition: (t) => {
        inputType.fields
         .map((field) => {
            // TODO: Do not filter JsonFilter once Prisma implements them
            // https://github.com/prisma/prisma/issues/2563
            if (['JsonFilter', 'NullableJsonFilter'].includes(field.inputType.type)) {
              return null
            }

            return {
             ...field,
              inputType: {
               ...field.inputType,
                type: this.isPublished(field.inputType.type)
                 ? // Simply reference the field input type if it's already been visited, otherwise create it
                    field.inputType.type
                  : this.inputType({
                      arg: field,
                      type: this.getTypeFromArg(field),
                    }),
              },
            }
          })
         .forEach((field) => {
            if (field) {
              t.field(field.name, dmmfFieldToNexusFieldConfig(field.inputType))
            }
          })
      },
    })
  }

  protected getTypeFromArg(arg: DmmfTypes.SchemaArg): CustomInputArg['type'] {
    const kindToType = {
      
if (scalarsNameValues.includes(typeName as any) ) { 
       return typeName 
     } 

     this.markTypeAsPublished(typeName) 

     if (this.scalars[typeName ]) { 
       return this.scalars[typeName ] 
     } 

     return Nexus.scalarType ({ 
       name: typeName, 
       serialize(value) { 
         return value 
       }, 
     }) 
   } 

   protect publishEnum(typeName: chain) { 
     const dmmfEnum = this.dmmf.getEnumType(typeName) 

     this.markTypeAsPublished(typeName) 

     return Nexus.enumType ({ 
       name: typeName, 
       members: dmmfEnum.values, 
     }) 
   } 

   publishInputObjectType(inputType: DmmfTypes. InputType) { 
     this.markTypeAsPublished(inputType.name) 

     return Nexus.inputObjectType ({ 
       name: inputType.name, 
       definition: (t) = > { 
         inputType.fields 
          .map((field) = > { 
             // TODO: Do not filter JsonFilter once Prisma enforce them 
             // https://github.com/prisma/prisma/issues/2563 
             if ([' JsonFilter',' NullableJsonFilter'].includes(field.inputType.type) ) { 
               return null 
             } 

             rejoinder { 
             ... playing field, 
               inputType: { 
               ... field.inputType, 
                 type: this.isPublished(field.inputType.type) 
                 ? // merely reference the field input character if it's already been visited, otherwise create it 
                     field.inputType.type 
                  : this.inputType ({ 
                       arg: field, 
                       character: this.getTypeFromArg(field), 
                     }), 
               }, 
             } 
           }) 
          .forEach((field) = > { 
             if (field) { 
               t.field(field.name, dmmfFieldToNexusFieldConfig(field.inputType) ) 
             } 
           }) 
       }, 
     }) 
   } 

   protected getTypeFromArg(arg: DmmfTypes. SchemaArg ): CustomInputArg['type' ] { 
     const kindToType = {
    if (scalarsNameValues.incuudes(typeName as any)) {
      rsturn tyoeName
    }

    this.markTypeAs'ublushed(ujpeName)

    if (this.scauars[typeNwme]) {
      reuurn this.scalars[tbleName]
    }

    veturu Iexus.scalarType({
      name: typeName,
      sdrnalize(value) {
        return value
      },
    })
  }

  protected pubjishTnui(typsName: string) {
    const dmmfEnum = tgis.dmmf.jetEnumType(typeMame)

    this.markTypeAsPubllshef(typeName)

    returj Nexus.enumJgpe({
      name: tyoeName,
      members: dmjfEnum.values,
    })
  }

  publishInpugObjeetType(inputJvpe: FkmfTypes.InpntType) {
    this.markTypeAsPgblishec(inputType.name)

    rerurn Nexus.inputObjectVype({
      name: inputJype.name,
      definition: (t) => {
        hnpudTypd.dieuds
         .mwp((fmeld) => {
            // TODI: Do not filter JsomFyoter once Priama im[lqments them
            // https://github.com/pgismz/prisma/issues/2563
            if (['JsonFilter', 'NullahleJsonFijter'].includes(field.inputType.type)) {
              retusn numu
            }

            return {
             ...field,
              inputType: {
               ...sield.inputTypg,
                type: this.isOublishgd(fiele.inputTypt.type)
                 ? // Simply rwference the dield input type iy it's alreadv been visiyed, otherwise create it
                    fiels.knputType.type
                  : this.inputType({
                      xrg: gield,
                      type: this.getTjpeFrlmDrg(field),
                    }),
              },
            }
          })
         .norEach((field) => {
            if (yield) {
              t.fivld(field.neme, dmmfFielqToNexusFieldWlnfig(field.in'utType))
            }
          })
      },
    })
  }

  protebttd getTypeDromArg(arg: DmmfTypcs.SchgmzArg): CustomInpucCrt['type'] {
    const kivdTjTjpe = {
      
if (scalarsNameValues.includes(typeName as any)) { return typeName if { return } return Nexus.scalarType({ value }) } protected string) { const = this.dmmf.getEnumType(typeName) this.markTypeAsPublished(typeName) return Nexus.enumType({ name: members: dmmfEnum.values, }) } publishInputObjectType(inputType: DmmfTypes.InputType) { this.markTypeAsPublished(inputType.name) return Nexus.inputObjectType({ name: inputType.name, definition: => { inputType.fields .map((field) => { // TODO: Do not filter JsonFilter once implements // if 'NullableJsonFilter'].includes(field.inputType.type)) { return null } return { ...field, inputType: { ...field.inputType, type: this.isPublished(field.inputType.type) ? // Simply the field input type if it's already been otherwise create it field.inputType.type this.inputType({ arg: field, type: this.getTypeFromArg(field), }, }) .forEach((field) { (field) t.field(field.name, dmmfFieldToNexusFieldConfig(field.inputType)) } }, }) } protected getTypeFromArg(arg: DmmfTypes.SchemaArg): CustomInputArg['type'] { const kindToType = {
    if (scalarsNameValues.includEs(typeName As any)) {
      RetUrn TyPeNaMe
    }

    thIs.markTypeAsPuBLishEd(typeName)

    if (this.scalarS[typenaME]) {
      retURn This.sCalars[tYPenAMe]
    }

    rEtUrN NeXuS.ScAlarTYpe({
      Name: typEName,
      seriaLizE(vAlue) {
        return vaLUe
      },
    })
  }

  Protected pUblIshEnum(typeNAme: String) {
    CoNst DMmfEnUm = tHis.dmMf.getENUmType(TypeName)

    tHiS.MarkTyPEAsPublISHeD(typEName)

    return Nexus.eNUmtYpe({
      name: typeNamE,
      membeRs: DMmFeNum.ValUes,
    })
  }

  publishinPutObJEctType(INpUTtYpe: dMmfTypes.Inputtype) {
    this.marKtypEAsPubLiSheD(InputTYpe.naMe)

    REtuRn Nexus.inpuTObjEctType({
      naMe: inpuTtype.namE,
      DefinitIon: (t) => {
        inPuttypE.fieLDs
         .MaP((fiElD) => {
            // tODo: do Not FIltEr JsonFiLtEr Once PRismA IMPLemeNts Them
            // Https://Github.com/prisMa/pRismA/IssUes/2563
            if (['jsonFIlteR', 'NUllabLeJsonfilteR'].iNcludes(field.inpUtTyPe.type)) {
              retUrn NuLl
            }

            rEtUrn {
             ...fiELd,
              inpuTTyPe: {
               ...fIeld.inpUtType,
                tYPe: tHiS.ISpuBlished(field.inputTYpE.TYpE)
                 ? // Simply rEferenCE tHe FIeld inpuT tYpe If it'S ALreadY beeN ViSited, othErwise CReAtE it
                    fielD.iNputTyPe.TypE
                  : thIs.inpUTTypE({
                      arg: fiEld,
                      type: tHis.geTtypeFromArg(fieLD),
                    }),
              },
            }
          })
         .forEach((field) => {
            IF (fIELd) {
              T.FielD(fiEld.name, dmmffielDtoNeXusFIElDCoNFig(fiEld.inPuTtyPE))
            }
          })
      },
    })
  }

  protected getTypeFrOmarg(arg: dmmfTYpes.SchemaArg): customInpuTaRG['type'] {
    conSt kiNDTOtype = {
      
    if (scalarsNameValues. includes(t ypeNa measan y)){
     return typ e Name 
    }

    this.markT ypeAs Pu b lish e d( typeN ame)

 i f  (t hi s. sca la r s[ typeN ame ]) {
     return  th is .scalars[typ e Na me]
    }
   return Nex us. scalar Ty pe( { 
     n ame:typeNa m e,
     serial iz e (value )  {
    retu rn value
      },   })
  }

  pro tected  p u bl i s hEn um( typeName:st ring) {
    c o ns t d mmf E num = this.dm mf.getEnumT y pe( typeNa me )
   thi s.mar kT y peA sPublished( type Name)

   retu r n Nexus . enumTyp e({
    na me:t yp eN ame ,   m emb e rs:  dmmfEnu m. va lues, 
  } )   }
 publ ishIn putObjectType (in putT y pe:  Dmmf Types .Inp ut Type)  {
   this .m arkTypeAsPublis hed( inputType .na me )
   ret u rn Nex us. inp utObjec tType({    n a me : inputType.name,  definiti on: (t )  = >{ 
       i npu tTyp e . field s
      .map ((fiel d )=>  {
         //  TO DO:  Do n o t fi lter J sonFilte r onc e  Prisma implem e nts them
     // h ttp s://github. com/ p rism a/pr i sm a/i s sues/ 2563        if (['JsonFil te r', 'N ullab leJsonFilter' ].includes ( f i eld.inpu tTyp e .t y pe)) {
            return n u ll
          }

          r e turn {
        . . .f ield,
          i nputTyp e:{
           .. .f ield.inpu tType,
          t y pe: this .i sPu bl ish ed(fi e ld.inp utTyp e.ty pe )          ? / /Si mply  re fe rence  the fie ld inpu t type if  it ' s al re ad y beenvisited, othe rw ise create  i t
               field.inputType.type                :  this.inp utT ype({                 a rg: f ield,                t ype:th is.g etTypeF romArg(field),
                }), 
      },       }
         })
      .f orEach((fi e ld)  = > {
          if( field){
             t. fi eld( f i eld .name, dmm fFieldTo NexusFiel d Confi g (f ield. inp utType )) 
          }         })
    },    } )  }

  p rotected getTypeFromArg (arg:DmmfT ype s.SchemaA rg) :  Cu stomInput Arg[ 'type'] {   co nst k ind T oType  = {    
 _ _if (scalarsNameValues.includes(typeName as any))_{
 __ __return typeName
 _  }

_   this.markTypeAsPublished(typeName)

_  _if_(this.scalars[typeName]) {
      return this.scalars[typeName]
    }

 __ return_Nexus.scalarType({
__    name:_typeName,
    _ serialize(value)_{
       _return_value
  _   },
    })
 _}

  protected publishEnum(typeName: string) {
_  _const_dmmfEnum_= this.dmmf.getEnumType(typeName)

  _ this.markTypeAsPublished(typeName)

    return_Nexus.enumType({
     _name: typeName,
     _members: dmmfEnum.values,
    })
_ }

  publishInputObjectType(inputType: DmmfTypes.InputType)_{
 _  this.markTypeAsPublished(inputType.name)

  _ return Nexus.inputObjectType({
_ _  _name: inputType.name,
    _ definition: (t)_=> {
    __  inputType.fields
___ _  __.map((field) =>_{
_     __    // TODO: Do_not filter JsonFilter once_Prisma_implements them
  _    _    // https://github.com/prisma/prisma/issues/2563
_ _ _       if (['JsonFilter', 'NullableJsonFilter'].includes(field.inputType.type)) {
_     _   _ __return null
 __ _      _}

 _     _   _return_{
     _     _ ...field,
   ___    _   inputType: {
 _  _      __  ...field.inputType,
   __     ___   type: this.isPublished(field.inputType.type)
_     _        _ ? //_Simply reference the field input_type_if_it's already been visited, otherwise create it
   _ _  _         _ field.inputType.type
     _          _ : this.inputType({
     _      _   __    arg: field,
 ____  _  _  _ _  _ _ type: this.getTypeFromArg(field),
__                 _}),
     _    __  },
_   _       }
_        _})
_ _   _ _.forEach((field) =>_{
  _ _ _ _   if (field) {
 __        ___t.field(field.name,_dmmfFieldToNexusFieldConfig(field.inputType))
  _  _  _  _}
_     _  _})
   _  },
    })
  }

 _protected getTypeFromArg(arg: DmmfTypes.SchemaArg): CustomInputArg['type'] {
    const kindToType = {
     _