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 setting schema in hook params #255

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dyllan-to-you
Copy link
Contributor

@dyllan-to-you dyllan-to-you commented Aug 14, 2020

Summary

  • Tell us about the problem your pull request is solving.
    Allow a user to set the schema a request will use by setting params.schema within a hook. This matches the API in feathers-objection

  • Are there any open issues that are related to this?
    No

  • Is this PR dependent on PRs in other repos?
    No

If so, please mention them to keep the conversations linked together.

Other Information

Caveats:

  • fullName getter is inaccurate whenever schema parameter is used. This results in weirdness in the tests and an inaccurate debug statement. Not sure how to remedy without breaking the fullName getter.

Outstanding Tasks:

  • [] Document this parameter in the README.md
  • [] Create a test for this usecase

@joezappie
Copy link

Any update on this? I want to be able to dynamically change the schema being used based on the logged in user. I see theres an option to set the schema when defining the service currently, but that doesn't work for this scenario. Adding the ability to set the schema in a hook would allow it to dynamically be changed. Is there a better currently supported way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants