Skip to content
Permalink
Browse files

fix(many-to-one): remove deprecated code (#211)

  • Loading branch information
goldcaddy77 committed Sep 12, 2019
1 parent e3661c8 commit a935ba9646deedd8dab54aeb15c446c21c9f9205
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/decorators/ManyToOne.ts
@@ -27,10 +27,12 @@ export function ManyToOne(parentType: any, joinFunc: any, options: any = {}): an
StringField(options)(target, `${propertyKey}Id`, descriptor);
};

// In some instances, we don't want to expose the foreign key ID through GraphQL
const graphQLdecorator = options.skipGraphQLField
? []
: [Field(parentType, { nullable: true, ...options }) as MethodDecoratorFactory]; // TODO: This should not be nullable by default
// NOTE: this is unnecessary, but I'm keeping it around because otherwise it will generate the schema properties in a different order
// It could otherwise safely be deleted
const graphQLdecorator = [
Field(parentType, { nullable: true, ...options }) as MethodDecoratorFactory
];
// END NOTE

const factories: MethodDecoratorFactory[] = [
extractClassName,

0 comments on commit a935ba9

Please sign in to comment.
You can’t perform that action at this time.