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

Anyone have a small sample project that implements mutations? #81

Open
Trellian opened this issue Jun 19, 2019 · 0 comments
Open

Anyone have a small sample project that implements mutations? #81

Trellian opened this issue Jun 19, 2019 · 0 comments

Comments

@Trellian
Copy link

Hi,

Does anyone perhaps have a small (but complete) example of an app source that demonstrates the use of Mutations (hopefully multiple Mutations).

My API server resides in a main file: server.js, and I want to import the Mutation definitions into this, and not define them directly in server.js. I will have several hundred mutations, and I need to be able to import them in a structured manner and not define them all in a single file.

Currently, if I try this, I cannot seem to get access to the Models inside the mutation, to be able to write to the DB. Even the tests say that the mutations are working, but they omit the all-important step of actually writing to the DB via Objection.

TIA

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

No branches or pull requests

1 participant