Comments (6)
I'm lining-up features for v2. Final thoughts on this? I'm a little ambivalent about it, especially in light of the fact that we can write this,
const { Movie } = server.models();
from schwifty.
Yeah that rocks! It wouldn't be hard to do either
from schwifty.
Wouldn't be hard to do, just wondering if it's going overboard or extending the API surface area in unnecessary ways. The thought has been stuck in my head since dogwater days, so figured I'd dump it here as a request/discussion. :) The main upside I can imagine is that it could give a good, hard error if you're trying to access a model from another plugin, or a model that doesn't exist at all.
from schwifty.
I like this. It seems like a bit of functionality that might not be needed all the time, but which will inevitably be needed, and which we ought to have a clean way to handle it.
from schwifty.
I prefer this version - it feels cleaner.
from schwifty.
Agree!
from schwifty.
Related Issues (20)
- Error: "schwifty" is not a method on the passed server. HOT 2
- 6.0.0 Release Notes
- Typings HOT 1
- Update peer dependency to allow Objection v3
- How to use Schwifty models in a seed file? HOT 2
- Upgrade deprecated version of hoek
- Support objection v2
- Update API links in docs to point to hapi.dev
- Support joi v16 HOT 1
- Provide migrations stub/template file
- Support hapi v19
- Model/knex namespacing and sandboxing
- Allow models to opt out of knex binding
- Allow models to provide a custom schwifty model name HOT 2
- Support hapi v20 HOT 1
- Proposed plugin API changes for v6
- Drop support for node v10 and below, hapi v18 and below, addl. objection, knex
- Publish on npm as @hapipal scoped package
- Internal validation using joi rather than @hapi/joi, which doesn't match dependencies
- Remove Model.getJoiSchema(), add Model.joiSchemaPatch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schwifty.