prismake / typegql

Create GraphQL schema with TypeScript classes.
https://prismake.github.io/typegql/
MIT License
424 stars 21 forks source link

Arguments To Query Type Not Exposed/Compiled? #68

Closed elmpp closed 5 years ago

elmpp commented 5 years ago

Hi there, think the library fits a real good niche. The typeorm fit in particular is real nice

I've hit a wall however when trying to accepts arguments to a query field. The schema just doesn't seem to include the name argument for the query field.

I have experimented at length with adding @Arg() etc also

Here's a reproduction repo - https://github.com/elmpp/typegql-params

This screenshot shows the graphiql request failing - https://github.com/elmpp/typegql-params/blob/master/ScreenShot.png

pie6k commented 5 years ago

https://prismake.github.io/typegql/getting-started/setup.html

Make sure to add "emitDecoratorMetadata": true, to your tsconfig.

Let me know if it helps

elmpp commented 5 years ago

That's done it. Cheers very much