Hi there,
Weāre relatively new to the DatoCMS way of doing things and are looking for advice on the best way to handle internal links around the website. Our ideal is that clients link to other records in the CMS to ensure consistency (e.g. if slugs change the links change) and a nice experience for the client.
We are currently building out a medium sized site that has around 13 different page types. From my current understanding if we want to be able to link to these pages we would need to specify all of those models in EVERY link or structured text field. Then expand all of those links in any GraphQL query that has a link or structured text and create a way to resolve those links on the front end to they end up pointing to the right place.
This seems like a) a lot of work given the nature of GraphQL and b) fairly unsustainable for a large website where there could be many structured text fields and link fields, all of which would need to be updated if we ever add a new page type in the future.
We have tried to limit the number of these fields by reusing blocks where possible and creating variables to use within GraphQL queries but it still fields very unwieldy. I could see it would be much simple to just make links a string but seems more error prone.
How do most people handle internal links? Is there a best practice way of doing things?
Thanks for your help,
Tim