1.0.0 • Published 3 years ago

fix-contentful-schema v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

fix-contentful-schema

The GraphQL schema Contentful generates has all of the fields for the content types listed as optional. This is technically correct as if you change a field to be required all of the items where it isn't filled out will remain published, but for me the hassle of having to write a bunch of null checks isn't worth mitigating this scenario. This is a small command line tool which will edit the content type fields in a JSON GraphQL schema (generated by graphql-code-generator's introspection plugin) to match the Contentful definition.