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

Refactor decorators class structure #22

Closed
16 tasks done
felipesabino opened this issue Oct 25, 2017 · 2 comments
Closed
16 tasks done

Refactor decorators class structure #22

felipesabino opened this issue Oct 25, 2017 · 2 comments
Milestone

Comments

@felipesabino
Copy link

felipesabino commented Oct 25, 2017

  • Refactor decorators to use new folder structure
- decorator
- metadata-builder
- metadata
  - args
  - types
  - options
- type-factory
- specs
  • Avoid using Reflect.defineMetadata and Reflect.getMetadata all over the code base to improve readability. Use specific MetadataArgsStorage methods instead.

  • Deprecate support decorators due to improvement from Decorators less verbose and subscriptions #14

  • Decorators

    • @UnionType
    • @EnumType + @Value
    • @Field + @Arg + @OrderBy + @Root + @Before + @Ctx
    • @ObjectType
    • @InputObjectType
    • @Query
    • @Mutation
    • @Subscription
    • @Schema
@thiago-soliveira
Copy link

Just some info about the @UseContainer() decorator. Its role is to tell the graphql decorator to use the passed container for classes instatiation, just so the typedi injection works on classes decorated with ObjectType or InputObjectType.
So... It was implemented as a decorator, but it actually should be a function that would get called on app configuration. Just like useContiner from pleerock/routing-controller

@felipesabino
Copy link
Author

So... It was implemented as a decorator, but it actually should be a function that would get called on app configuration

Oh sure! I completely missed that on #32 (https://github.com/indigotech/graphql-schema-decorator/pull/32/files#diff-b4975713b292137c31ec2d18544e2323). I updated the issue description to reflect your comment, thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants