We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Package
Description / Use Case for a Feature
Currently it is not possible to define a default expression for relations. This was possible with GQL-Type-Definitions.
Example:
@Entity() export default class Post extends BaseEntity { @PrimaryGeneratedColumn() public id: string; @Column({ gqlType: "String", type: "character varying" }) public title: string; @ManyToOne((type) => User, "posts", { default: () => { return "_auth.current_user_id()" } }) public owner: User; }
If I don't allow to set the owner over GQL the post will be owned by the current user by default without forcing the user to submit an ownerId.
owner
ownerId
Maybe this is relevant: typeorm/typeorm#2427
The text was updated successfully, but these errors were encountered:
terehov
davidsparkles
No branches or pull requests
Package
Description / Use Case for a Feature
Currently it is not possible to define a default expression for relations. This was possible with GQL-Type-Definitions.
Example:
If I don't allow to set the
owner
over GQL the post will be owned by the current user by default without forcing the user to submit anownerId
.Maybe this is relevant: typeorm/typeorm#2427
The text was updated successfully, but these errors were encountered: