Comments (4)
@toxsick interesting request. I can see it working by basically parsing views in the same way as models. The builder would have a new .view()
helper, e.g.
builder.view("UserInfo").field('value', 'Json')
creates
view UserInfo {
value Json
}
Does that sound correct to you?
from prisma-ast.
Hey @MrLeebo, that sounds super correct and would be nice to have!
Thanks a lot and have a nice weekend!
from prisma-ast.
@toxsick Please install v0.6.0 and see that it works as you expect. Please note that builder.modelAttribute()
has been renamed to builder.blockAttribute()
since it is relevant to both models and views now.
from prisma-ast.
@MrLeebo AWESOME 🥳 Works perfectly, now I can use Prisma Views in PROD.
Thanks a lot and have a good day!
from prisma-ast.
Related Issues (20)
- Schema Builder API
- Throws when passing an empty array into an attribute HOT 3
- Doesn't extend existing model HOT 6
- Issue with documentation example HOT 2
- Bug with db.ObjectId HOT 1
- @@map in Enums can not be parsed properly HOT 1
- `getSchema` - model attributes are not parsed HOT 1
- feature request: Include source code location for each node HOT 9
- Renaming a model attribute or deleting an attribute and creating a new attribute with the same args of the deleted one HOT 4
- getSchema doesn't produce break-nodes HOT 3
- getSchema- Empty comments are not parsed correctly HOT 1
- Missing `produceSchema` in the bundle? HOT 1
- MismatchedTokenException if certain keywords are used in the generator name HOT 1
- Possible issue parsing when hyphen in generator name HOT 2
- Thank you! HOT 2
- Support for @map on enum fields HOT 2
- [Feature] Tracking name changes HOT 5
- MismatchedTokenException: Expecting --> '}' <-- but found --> 'model' <--
- Trailing comments not handled properly HOT 2
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 prisma-ast.