Query for document by uid returns document with different uid

See screenshot. I'm querying for a document by uid and the graphql api returns a document with a different uid. This is happening on my repo https://ilo-voices.prismic.io/

Hello @smithj,

Thanks for posting this to us.

I have checked your repository and found that skills-training is an old UID in Equality and diversity name document. You can check your page's version by clicking on the History button(Screenshot attached).

This behavior happens because the UID field stores all previous values and allows you to query the document with these, even after the value has been changed. It was designed this way so the old link using the old UID value would still work (you wouldn't end up with broken links everywhere when you change the UID value).

What do you want as a UID?

  1. If you want a skills-training' UID in the topic` document, click on the history button and version the document. Learn more about the version of the document in this guide: Version Documents - Guides - Prismic

  2. If you want to have "Equality and diversity" as a UID and "skills-training" uid return null in graphql explorer, then you need to remove, & unlock an old UID value from a document. For this, duplicate the "Equality and diversity" document by clicking the Duplicate button. After you've duplicated it, you can delete the original, allowing you not to query by "skills-training" uid. It will return null (Screenshot attached).

I hope it answers your question. Let me know if you have any further questions.

Thanks,
Priyanka