rivantsov / vita

VITA Application Framework
MIT License
59 stars 15 forks source link

Integration with NGraphQL #174

Closed jasonlaw closed 3 years ago

jasonlaw commented 3 years ago

Hi @rivantsov ,

Good day to you.

It has been a while since the last update, I am eagerly expecting the new release, especially on the Middleware which may co-exists well with VitaWebMiddleware, and the authentication, which could be crucial for our services.

Thanks again for this great framework, and it becomes more interesting with the introduction of NGraphQL.

Thank you!

rivantsov commented 3 years ago

well, that's a bit surprising for me, I thought you have all you need regarding these things, and I believe you do :), But I might be wrong actually, let me have another look, I will try to push the code this week thanks!

rivantsov commented 3 years ago

working on it...

rivantsov commented 3 years ago

pushed new code, no changes to packages; just updated GraphQL sample project - added login functionality and handling Jwt token (by VitaWebMiddleware). The addReview mutation changed to use the current logged in user as an author of the review, so it requires authenticated user. There's a Readme file in the sample project folder, with some explanations. Have a look, I think this is what you need.

jasonlaw commented 3 years ago

Thanks, will take a look into that. :) Btw, I think the OperationContext still missing the SmartLoad option for OpenSession, this is also something I am waiting for. :)

// Should be support for OperationContext too. _session = _app.OpenSession(EntitySessionOptions.EnableSmartLoad);

rivantsov commented 3 years ago

about this - you can always create your own extension with necessary parameters and pass it to session constructor

jasonlaw commented 3 years ago

alright, will do that, thanks!