TriPSs / nestjs-query

Easy CRUD for GraphQL.
https://tripss.github.io/nestjs-query/
MIT License
161 stars 43 forks source link

Passing Graphql query resolver args as part of call to QueryService #55

Closed mrvinceit closed 6 months ago

mrvinceit commented 2 years ago

Is it possible to get the parent and info resolver args from the CRUD resolver without too much hassle or code rewrite?

The particular case here, we're hoping from a means of passing parent and info resolver args in the CRUD DTOs, beause this will allow users to dynamically create the query

mrvinceit commented 1 year ago

I can get on board with that, I think that with https://github.com/TriPSs/nestjs-query/pull/151 bringing in the selection object will definitely do this some justice.

It would be really great to address this at the same time as well:

  • provide typed Selections<DTO> property in a manner similar to Filter<DTO>

I left some notes (https://github.com/TriPSs/nestjs-query/issues/55#issuecomment-1364094980) on this previously, and it looks like I still have the draft of this implementation https://github.com/TriPSs/nestjs-query/pull/71 :sweat_smile:

And thank you, I appreciate these discussions as well, this has been really a great package, and definitely many props to you for bringing it so far.

TriPSs commented 6 months ago

I'm going to close this as it's I think now possible with the @GraphQLResultInfo decorator and it's info is passed down to the service.