corollarium / modelarium Goto Github PK
View Code? Open in Web Editor NEWGenerates scaffolding for frontend and backend from schemas
Home Page: https://corollarium.github.io/modelarium/
License: MIT License
Generates scaffolding for frontend and backend from schemas
Home Page: https://corollarium.github.io/modelarium/
License: MIT License
Relationships in queryItem
fetch all attributes. We should only fetch the card attributes.
It is necessary for the type Can
for example.
We could generate feature tests for queries and types automatically. Perhaps something like:
foreach ($model) {
if (exists query $model) {
add method for queryItem;
}
if (exists query plural($model)) {
add method for queryList;
}
}
Describe the bug
id: ID! @renderable(table: true)
does not work. It's not added to the table (though it's on the query graphql) because id is a special field and not present in fields
of the formularium model. so we can't print the id on the table.
Describe the bug
Created: CreateReportTable
, expected CreateReport20210305125836Table
;
RelationshipAutocomplete requires https://github.com/trevoreyre/autocomplete. Find some way to include these JS deps in the target Laravel application. Perhaps this: https://stackoverflow.com/questions/60347399/registering-vue-components-in-laravel-package
When a relationship autocomplete input is cleared, the original value is kept. It should be reset.
Describe the bug
Seeds break because they try to getRandom(). Two problems:
posts
) don't match db keys (post_id
)To Reproduce
Steps to reproduce the behavior: run test app.
In MigrationGenerator, enums are not checked for change of values between runs. Removing values can mess the DB integrity and should not be deal with automatically, but addition is harmless.
parse enum in graphql and create php code
Shouldn't.
Currently working around by commenting these problematic fields.
Describe the bug
inputs are ignored when the queryList is generated.
To Reproduce
Steps to reproduce the behavior:
extend type Query {
stuffs(
priceRange: PriceRange
): [Stuff!]
}
type PriceRange {
min: Int
max: Int
}
Describe the bug
Model::$fillable does not add _id
to the relationships fields.
Reproduce: php artisan modelarium:scaffold Post --model --overwrite --lighthouse
Test and support autocomplete multiple
Read options of commands from there instead of always passing it by command line.
Relationships with few possibilities should be cached for autocomplete or converted to a plain select automatically.
Describe the bug
The query uses just the relationship name, not recursing. Should use id or title field, and link it.
casing is generating problems. review.
Describe the bug
Vue generation assumes can
is present when it is not. Should check its existence.
Possibly a v-if.
Frontend templates for components could be exported to a user directory so they could be customized
Lighthouse definitions are currently (manually) exported to a graphql file that is bundled with Modelarium. That's error prone and requires a specific lighthouse version. Lighthouse outputs a full graphql build through graphql, but that mixes user directives, modelarium directives, etc.
It should be possible to build this at runtime and filter the namespaces to get an always trustworthy directive declaration.
Conversion is parsed and generated, but it's not accessible on the graphql.
Many-to-many relationships are not properly seeding. The individual models are generated and the code was fixed to avoid creating random values in getRandomData
, but the pivot table is not being seeded.
The proper fix should be to write a seeder for that, using a loop with ->attach() for the target model.
Describe the bug
Patch class names do not match the expected class name by laravel. They add a timestamp to avoid clashes, but the filename doesn't have it.
=> missing import xxx from ....
If you create a new directive on the local project using Lighthouse it's not added to the schema and scaffolding breaks.
itemtype
is supported on Formularium on the HTML renderer. itemprop
is already parsed on @renderable
, but there's no parser on object
that sets itemtype.
Migrations at this time generate a _patch_
file that is empty. We know the previous model and we can diff to see what changed, and then generate the actual patch code with new, changed or deleted fields.
Describe the bug
Morph relationships lose the morph targets when schema is processed. This means renderable and the datatype cannot validate it or generate graphql queries correctly.
We need to store the target types on the datatype relationship class so they can be accessed later.
GraphQl has enum
, implement it.
Describe the bug
lighthouse-graphql-passport-auth
has a migration 2019_11_19_000000_update_social_provider_users_table.php which expects the user table to already exists. This is run before the generated user table, which is dated 2020.
Run composer run-script test
> ./vendor/bin/phpunit --configuration phpunit.xml tests/
PHPUnit 8.5.14 by Sebastian Bergmann and contributors.
PHP Fatal error: Cannot use 'Mixed' as class name as it is reserved in /home/runner/work/modelarium/modelarium/Modelarium/Types/Mixed.php on line 13
Script ./vendor/bin/phpunit --configuration phpunit.xml tests/ handling the test event returned with error code 255
Error: Process completed with exit code 255.
Describe the bug
Declaring a n:m relationship creates wrong foreign keys
To Reproduce
Steps to reproduce the behavior: declare a migrationForeign key on a belongsToMany directive:
type User {
id: ID!
projects: [Project!] @hasMany
}
type Project @migrationTimestamps {
users: [User!]! @belongsToMany @migrationForeign(onDelete: "cascade", onUpdate: "cascade")
}
Expected behavior
A proper foreign key to user_to_projects
. Actual behavior:
$table->foreign("user_id")->references("id")->on("users")->onDelete("cascade")->onUpdate("cascade");
graphql
see above
Additional context
Add any other context about the problem here.
UX: Autocomplete relationship could have a footer showing the number of items displayed versus total available.
the elements are still with the old filterName
parameters. Update to filters
@nest
parsing bug, @deprecated
conflicting
scalar Mixed @scalar(class: "Modelarium\\Types\\Mixed")
scalar RulesMessageMap @scalar(class: "Modelarium\\Types\\Mixed")
For example, when generating random data. Probably needs to override saving()
or something like that.
Describe the bug
scalar.graphql loses case.
To Reproduce
Create a scalar with name like "ThisName". It is created as Thisname on the graphql..
If a field is generated with @modelAccess and present on @Renderable and it's a Type and not a Scalar, the query generated does not include its fields.
Describe the bug
Apparently the seeder always sets zero as id, despite creating the item.
To Reproduce
Steps to reproduce the behavior:
When new @can
directives are added patch the existing policy files.
See https://github.com/nette/php-generator#generate-using-reflection
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.