starter icon indicating copy to clipboard operation
starter copied to clipboard

feature: add postgraphile-tag-json-tools for json schema generation

Open phryneas opened this issue 5 years ago • 0 comments
trafficstars

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:fix passes.
  • [ ] I've added tests for the new feature, and yarn test passes.
  • [ ] I have detailed the new feature in the relevant documentation.
  • [ ] I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • [ ] If this is a breaking change I've explained why.

phryneas avatar Oct 07 '20 15:10 phryneas