-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature - Refactoring @Field decorator #34
Conversation
d49d5b5
to
25b3235
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 comments:
- I think there are some unneeded imports of
reflect-metadata
ArgumentArg
... a little bit strange but I have no better suggestion
src/pagination.middleware.ts
Outdated
@@ -0,0 +1,27 @@ | |||
import 'reflect-metadata'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this here? I'm not finding a need...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some unneeded imports of reflect-metadata
I was getting a lot of error like
Uncaught TypeError: Reflect.getMetadata is not a function
So this helped me suppress it... found this solution here but do not know a better alternative.
Do you know the root cause for it? Any idea if something at tsconfig
might fix this issue without these imports?
ArgumentArg
... a little bit strange but I have no better suggestion
Same here 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some unneeded imports of reflect-metadata
Ok, I did some reading and I need it just in my app/lib entry point, so I added it to both index.ts
and *.spec.ts
Sorry but this will be a big PR with a lot of breaking changes
@Field
decorator and nested dependencies (@Arg
,@OrderBy
,@Root
,@Before
and@Ctx
) - Refactor decorators class structure #22DefaultOption
,DefaultMetadata
andDefaultArg
interfaces to justOption
,Metadata
andArgument
instead as in Feature - Refactoring more decorators #32 (comment)MetadataBuilder
instead ofReflect
)field_type_factory
to handle metadata properly and to be less verbose/confusingTODO
s for possible missing tests@Pagination
@Description
@List
@NonNull