Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Sep 12, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -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,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.