starter
starter copied to clipboard
feature: add postgraphile-tag-json-tools for json schema generation
Like requested in #205
Description
This PR only uses the createJsonSchema part of postgraphile-tag-json-tools, as extractSmartTags and loadSmartTags functionalities do not seem necessary here.
Changes in the database will update @app/server/pg-database-smart-tags.schema.json, but edits in @app/server/pg-smart-tags.schema.json will persist, so additional tags can be added without fear of something being overridden. (I added simpleCollections and resultFieldName, as I didn't have those in my initial schema - if you can think of any more tags, please mention them & I will add them.)
I've marked the place to add new tags with "$comment": "------ Add extra tags here, in properties. ------",.
Performance impact
None in production use, probably neglectable in dev mode.
Security impact
None in production use, nothing I could think of in dev use.
Checklist
- [x] My code matches the project's code style and
yarn lint:fixpasses. - [ ] I've added tests for the new feature, and
yarn testpasses. - [ ] I have detailed the new feature in the relevant documentation.
- [ ] I have added this feature to 'Pending' in the
RELEASE_NOTES.mdfile (if one exists). - [ ] If this is a breaking change I've explained why.