Is there a way to add documentation to the schema?...
# prisma-whats-new
m
Is there a way to add documentation to the schema? For instance, add a description of what each field is for.
d
just a regular comment for a field and it will get parsed into a documentation
m
Thank you! Do you know if there is any way to add comments that aren't added to the documentation? Or possibly add comments that separate the fields into different categories?
d
well, that mostly depends on a software that will parse and display that documentation, eg. graphiql will do only plain comments, not sure if there some other tools that would provide something more complex
either way, I would say this is one of great benefits of GraphQL, the schema itself (without comments) is self documented pretty well ... in case you need to add more information, there is a possibility that by clearly naming the field you might get more benefit than some long comment
m
Yeah it does seem very nice so far! That clears that up, thank you 🙂