Decorators

    @InputType과 @ObjectType을 동시에 데코레이터 사용 시 주의할 점

    @InputType과 @ObjectType을 동시에 데코레이터 사용 시 주의할 점

    import { InputType, ObjectType } from 'type-graphql';@InputType()@ObjectType()class Episode { // class fields and methods}위 코드에 Episode 클래스는 동시에 @InputType()과 @ObjectType() 데코레이터가 적용되어 있다.이 경우, 자동으로 생성되는 SDL(Schema Definition Language)에서 이름 충돌이 발생할 수 있다.  type Episode { # fields defined by @ObjectType()}input Episode { # fields defined by @InputType()}SDL로 변환하면 자동으로 클래스 이름으로 type 또는 input 등의 ..