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

feat: Add i18n-context-service to inject custom contexts #383

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jurienhamaker
Copy link

Currently I am working on a project that has a custom request scope.
Similair how this package provides rpc, graphql & http out of the box. This will allow the user to add custom contexts and functions to get the context of said custom context.

I do need some help with the I18nLang decorator, since I have no clue how I could inject the service into a paramDecorator.

Same for the tests, any suggestions are welcome.

@jurienhamaker
Copy link
Author

@toonvanstrijp Have you had any time to look at this yet?

@toonvanstrijp
Copy link
Owner

@jurienhamaker I'll take a look at it right now ;)

@coveralls
Copy link

coveralls commented Sep 2, 2022

Coverage Status

Coverage decreased (-0.8%) to 90.755% when pulling ec910c9 on jurienhamaker:feature/custom-context into 8b998ab on toonvanstrijp:main.

@toonvanstrijp
Copy link
Owner

@jurienhamaker looks good so far, the only thing that I'm not sure about yet is how to make the I18nLang decorator work.

@toonvanstrijp
Copy link
Owner

@jurienhamaker @jurienhamaker alright I have a potential solution. In the i18n-language.interceptor.ts we get the context object and put the i18nService and i18nLang on there. But we can also set things on the nestjs context so: context.i18nCustomContexts (not the ctx one). Then inside the parameterDecorator we can access them by doing context.i18nCustomContexts.

@SocketSomeone
Copy link

@toonvanstrijp Any updates?

@rubiin rubiin added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2023
@rubiin
Copy link
Collaborator

rubiin commented Aug 18, 2023

#489 #479 related

@rubiin
Copy link
Collaborator

rubiin commented Aug 21, 2023

@toonvanstrijp can you look on this one on your free time. Since this is older and almost mergeable I would like your input. This will help close few issue

@sawa-ko
Copy link

sawa-ko commented Jan 20, 2024

Hey @toonvanstrijp, can you check this pull request please!? 🙏

@sawa-ko
Copy link

sawa-ko commented Jan 20, 2024

Or you @rubiin?

@rubiin
Copy link
Collaborator

rubiin commented Jan 20, 2024

plz fix the merge conflicts

@rubiin rubiin marked this pull request as draft January 24, 2024 08:15
@BARTlab
Copy link

BARTlab commented Mar 6, 2024

can you fix the conflicts and accept the changes to update the version? or can I do this in your pr?

@rubiin
Copy link
Collaborator

rubiin commented Mar 6, 2024

@BARTlab go ahead

@SocketSomeone
Copy link

@jurienhamaker you're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants