-
Notifications
You must be signed in to change notification settings - Fork 142
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
Issue with nullable reference when using federation #1051
Labels
bug
Something isn't working
Comments
mwoelk
added a commit
to mwoelk/nestjs-query
that referenced
this issue
Apr 8, 2021
mwoelk
added a commit
to mwoelk/nestjs-query
that referenced
this issue
Apr 8, 2021
mwoelk
added a commit
to mwoelk/nestjs-query
that referenced
this issue
Apr 9, 2021
mwoelk
added a commit
to mwoelk/nestjs-query
that referenced
this issue
Apr 9, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 12, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 12, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 12, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 12, 2021
Merged
doug-martin
pushed a commit
that referenced
this issue
Apr 13, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 13, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 13, 2021
doug-martin
pushed a commit
that referenced
this issue
Apr 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using a nullable
@Reference
, there are two small issues.@Reference
decorator is used to set the relation tonullable
. But only passing{nullable: true}
leads to a type error because it also expects akey
property which should have also been omitted here:nestjs-query/packages/query-graphql/src/decorators/reference.decorator.ts
Line 9 in 70fd48e
nestjs-query/packages/query-graphql/src/resolvers/relations/references-relation.resolver.ts
Lines 36 to 39 in 70fd48e
It should return null otherwise we get the error that the id field on the referenced type is not nullable!
Have you read the Contributing Guidelines?
yes
To Reproduce
Steps to reproduce the behavior:
Expected behavior
In case of a nullable reference, the resolver should return null instead of a typename with an id of null.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: