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

[typegoose] default assembler for creation is unusable #1165

Merged
merged 1 commit into from
Jul 24, 2021
Merged

[typegoose] default assembler for creation is unusable #1165

merged 1 commit into from
Jul 24, 2021

Conversation

onichandame
Copy link
Contributor

@onichandame onichandame commented Jun 17, 2021

Problem

When trying the basic functionalities with typegoose, every GraphQL call to createOne/createMany fails with the error: Id cannot be specified when updating or creating.

Debug

The first place I found was this line, where the error is thrown.

Then I found that the error-throwing function was called with argument { id: undefined }. This weird object comes from here.

Hence I believe that the default behaviour is broken somehow.

Solution

There are 2 places where it can be fixed(see the 2 links above). As one of them is related to an external dependency class-transformer, it is easier to fix it from the other side.

onichandame added a commit to onichandame/nest-demo that referenced this pull request Jun 17, 2021
@onichandame onichandame changed the title default assembler for creation is unusable [typegoose] default assembler for creation is unusable Jun 17, 2021
@doug-martin doug-martin changed the base branch from master to v0.28.1-rc July 24, 2021 01:21
@doug-martin doug-martin merged commit 3d02d79 into doug-martin:v0.28.1-rc Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants