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

Create queriers in addition to mutators + standardize mutators #82

Open
eric-burel opened this issue Oct 14, 2021 · 0 comments
Open

Create queriers in addition to mutators + standardize mutators #82

eric-burel opened this issue Oct 14, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request hacktoberfest

Comments

@eric-burel
Copy link
Collaborator

eric-burel commented Oct 14, 2021

Is your feature request related to a problem? Please describe.

  • Connector is a more direct connection to the db, but it doesn't use Vulcan "magic" and callbacks. They are internal to Vulcan and should not be used in user apps.

  • Mongoose models are ok for direct connection to the db, it's ok to use them but also won't run the callbacks.

  • Mutators will run Vulcan callbacks and permission checks, they are better suited for custom mutations.
    We need an equivalent for queries, "Queriers". In particular, the querier should run permission check and remove unallowed fields.

Describe the solution you'd like

  • It should be as easy as possible to use a mutator. Namely, mutators can be either called in a mutation, in response to a request, or outside a mutation, so without a request (eg when seeding data) => both use cases should be handled correctly.

Normally, mutators do not depend on the request context, and should not use DataSources (they are only needed for field query resolvers, not for mutations), so the graphql context should not be a problem. It used to be an issue in Vulcan Meteor but that was because we used the GraphQL context wrongly.

  • Queriers are the equivalent for queries. They should fetch data correctly, and check permissions namely.
@eric-burel eric-burel added enhancement New feature or request hacktoberfest labels Oct 14, 2021
@eric-burel eric-burel changed the title Create queriers in addition to mutators Create queriers in addition to mutators + standardize mutators Mar 31, 2022
@eric-burel eric-burel added this to To do in Ongoing work Mar 31, 2022
@eric-burel eric-burel moved this from To do to In progress in Ongoing work Mar 31, 2022
@eric-burel eric-burel self-assigned this May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
Ongoing work
In progress
Development

No branches or pull requests

1 participant