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

Add support for parameter decorators in typescript #199

Closed
meds opened this issue Apr 6, 2019 · 1 comment
Closed

Add support for parameter decorators in typescript #199

meds opened this issue Apr 6, 2019 · 1 comment
Labels
out of scope Unfortunately there's always more work than people to do it

Comments

@meds
Copy link

meds commented Apr 6, 2019

The following does not work and causes issues when attempting to do reflection:

import { Field, ObjectType, ID, Query, Resolver, Arg } from "type-graphql";

import { Resolvers } from "../resolver";


@ObjectType()
class Recipe {
  @Field(type => ID)
  id: string;

  @Field(type => [String])
  ingredients: string[]
}


@Resolver(of => Recipe)
class RecipeResolver {   
    @Query(returns => String, { nullable: true })
    recipe(@Arg("title", type => String) title: string): string {
      return "test"
    }
}

It appears to be caused by the parameter decorator 'arg' being ignored.

@ahmelsayed ahmelsayed transferred this issue from Azure/azure-functions-core-tools Apr 8, 2019
@ejizba
Copy link
Contributor

ejizba commented Jan 28, 2022

Closing this because it's old/stale and I don't see us adding support for decorators by itself. However, I'm sure it will be discussed as a part of #480

@ejizba ejizba closed this as completed Jan 28, 2022
@ejizba ejizba added out of scope Unfortunately there's always more work than people to do it and removed wontfix labels Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
out of scope Unfortunately there's always more work than people to do it
Projects
None yet
Development

No branches or pull requests

5 participants