mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
3d6732b678
Foreign keys will now be detected if a column name is `<table_name>_id`. Earlier, foreign keys would be detected when column name was `<table_name - s>_id`. This was a problem because it placed restrictions on table names. Such restrictions were limiting us from importing complicated JSON databases. Here are the examples of JSON sampel data for a user, post and comment schema as per new and old conventions: Old convention: ``` { posts: [ { id: 1, title: "Lorem Ipsum", views: 254, user_id: 123 }, { id: 2, title: "Sic Dolor amet", views: 65, user_id: 456 }, ], users: [ { id: 123, name: "John Doe" }, { id: 456, name: "Jane Doe" } ], comments: [ { id: 987, post_id: 1, body: "Consectetur adipiscing elit" }, { id: 995, post_id: 1, body: "Nam molestie pellentesque dui" } ] } ``` New convention: ``` { post: [ { id: 1, title: "Lorem Ipsum", views: 254, user_id: 123 }, { id: 2, title: "Sic Dolor amet", views: 65, user_id: 456 }, ], user: [ { id: 123, name: "John Doe" }, { id: 456, name: "Jane Doe" } ], comment: [ { id: 987, post_id: 1, body: "Consectetur adipiscing elit" }, { id: 995, post_id: 1, body: "Nam molestie pellentesque dui" } ] }; ``` @FrediBach I am not sure how this would affect [Blowson](https://github.com/FrediBach/json-data-extender). Can you provide some input? |
||
---|---|---|
.. | ||
boilerplates | ||
examples | ||
tools/json2graphql | ||
README.md |
Community
This directory contains community contributed code and content that supplements Hasura GraphQL Engine. It includes several example applications built using GraphQL Engine to demonstrate it's features, several boilerplates for users to get started with auth webhooks, triggers etc. and some community tooling around the Engine.
Feel free to open pull requests to add more content here.
License
All contents of this directory are under MIT License.