3 ms·
I would love to see some auto generated (non-techie) graphical user interface for this like phpmyadmin but w/o all the developer focused options. Eg. if there
by laszlokorte 9y ago
I would love to see some auto generated (non-techie) graphical user interface for this like phpmyadmin but w/o all the developer focused options.
Eg. if there is a m:n relationship do not make me enter some foreign key values into a join table but give me some nice autocomplete fields or checkboxes on either side of the relationships' types.
Or if there is some transitive relationship like "country -> city -> district -> office", give me some nice way to filter the list of offices by a given country oder district.
Auto generates this from the schema as web interface.
I already tried building this for SQL schemata but it seems like a schema definition as provided by EdgeDB seems predestined for this use case.
- 1st1 9y agoYes, automatic UI generation is something we've been doing with EdgeDB for years in our products. Having a uniform object data model and introspection makes it easy to automatically generated complex nested forms and grids. We'll likely build a React microframework to generate UIs for EdgeDB at some point after beta release.
- oneweekwonder 9y agoHave you looked at dumping json-schema? Because then something like json-editor[0] will just work out of the box. Got extensively tested with swagger v2(openapi)[1]. After the json-schema you write a quick swagger spec and modify a couple of mustache templates[3] to generate a crud interface for server and client. In your language of choice. All with one magic yaml file; but file format agnostic as well; Personally I struggle to read the json format. [0]: https://github.com/json-editor/json-editor https://github.com/json-editor/json-editor [1]: https://github.com/swagger-api/swagger-editor/tree/2.x https://github.com/swagger-api/swagger-editor/tree/2.x [3]: https://github.com/swagger-api/swagger-codegen/ https://github.com/swagger-api/swagger-codegen/
- zawerf 9y agoI recently tried Postgraphile [1] on an existing postgres database (briefly just for fun, not in prod) and it sort of does what you want. As long as the foreign keys are there, it will generate the correct graphql queries. It even pluralizes the query names depending on whether it's a one-to-one or one-to-many relationship. Once it's in graphql you can just use the interactive graphql endpoint which has autocomplete and documentation to write your queries. A schema like: create table post ( id serial primary key, author_id int non null references user(id), headline text, body text, ... ); Can query relations like so: allPosts { edges { node { headline body author: userByAuthorId { name } } } } [1] https://github.com/graphile/postgraphile/tree/postgraphile#automatic-relation-detection https://github.com/graphile/postgraphile/tree/postgraphile#a...
- oneweekwonder 9y agoYou aware of any graphsql layer for postgres implemented in pgsql or pl/python? Something like using JSONB datatype in a entity key value store table. Mapping materialized views using pgsql json functions. To flatten out the data into sql tables for normal consumption?
- agborkowski86 9y agopostgraphile# is a good solution, even more this project allow u to write ur custom adapters for each db