Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
Resolver inheritance dont show arguments typegraphql

i have an issue whit the typegraphql, I try to do a BaseResolver that can have a base CRUD operations whit typeorm but when i compile the protect whit ts node i don't get the arguments of there resolvers query/mutation, instead the arguments show and then disappear after a couple of seconds of compile this is my code.

export function CreateBaseResolver<X extends ClassType, T extends ClassType>
(
    Suffix: string,
    ReturnEntity: T,
    BaseInput: X,
    Entity: any,
)
{
    @Resolver({ isAbstract: true })
    abstract class BaseResolver
    {
        @Mutation(() => [ReturnEntity], { name: `PostOne${Suffix}` })
        async PostOne(@Arg('Data', () => BaseInput) Data: any) 
        {
             //Make logic
        }

    }

    return BaseResolver;
}

this is the normal resolver

@InputType()
export class ProductInput
{
    @Field()
    Id_Product: number;
}


const ProductBaseResolver = CreateBaseResolver('Product', Product, ProductInput, Product);

@Resolver(Product)
export class ProductResolver extends ProductBaseResolver
{

}

i found this in the issues of github https://github.com/MichalLytek/type-graphql/issues/55

it seems like we need to compile the typescript whit babel, but i use ts node in my case, try to do it whit babel but get the same error and i don't have parameters in my resolver, if anyone has this issue please i really appreciate an example of how to do it whit babel i will give mi pakaje.json info bellow

  "scripts": {
    "watch": "tsc -w",
    "dev": "nodemon dist/index.js",
    "start": "node dist/index.js",
    "prestart": "ts-node src/index.ts"
  },
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda