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

Feature request: Configurable schemas folder name #10

Closed
chaeron opened this issue Sep 15, 2020 · 4 comments
Closed

Feature request: Configurable schemas folder name #10

chaeron opened this issue Sep 15, 2020 · 4 comments
Labels
core Graffiti core related stuff enhancement New feature or request good first issue Good for newcomers

Comments

@chaeron
Copy link

chaeron commented Sep 15, 2020

Cool project!

Any chance you could add the ability to specify the location of the mongoose schemas to the config?

You cannot assume that all projects will want to have their schemas in a folder called schemas, when graffiti is an "add on" to an existing project.

@yamalight yamalight added core Graffiti core related stuff enhancement New feature or request labels Sep 15, 2020
@yamalight
Copy link
Owner

That's a pretty good idea. I'd prefer to keep the folder name same, but adding basePath to config (similar to how Next.js does this) should solve the issue 🤔

@yamalight yamalight added the good first issue Good for newcomers label Sep 15, 2020
@chaeron
Copy link
Author

chaeron commented Sep 15, 2020

If you're gonna make it configurable, make the whole name configurable, not just the path. There is no reason to dictate the folder name. ;-)

For example, we have a healthcare application with very complex mongoose schemas....and we keep them all in a folder called models. That is to distinguish from schemas, which are JSON schemas in our world, which are then used to code generate the actual mongoose models.

But keep the default as "schemas" in the root level.....

@yamalight
Copy link
Owner

Interesting 🤔
I guess it's relatively straightforward config thing anyways, so why not 😅

@yamalight
Copy link
Owner

Shipped in graffiti@1.1.0! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Graffiti core related stuff enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants