strapi-community / strapi-plugin-slugify

A plugin for Strapi Headless CMS that provides the ability to auto slugify a field for any content type.
https://market.strapi.io/plugins/strapi-plugin-slugify
MIT License
45 stars 21 forks source link

feat(graphql): add publicationState filter support #23

Closed DomDew closed 2 years ago

DomDew commented 2 years ago

Hey there, thanks for this awesome plugin!

Working on a project right now, I felt the need to be able to query for unpublished content types - to generate Preview Links for a Next.js frontend more specifically.

I took the liberty to expand the logic in the graphql type, as well as the slugController.

With these changes publicationState can be added as an optional arg to the fingSlug query and can be passed to the regular REST endpoint as an optional query param.

DomDew commented 2 years ago

@ComfortablyCoding Thanks for the review and the great suggestions! I think everything should be working now as expected!

ComfortablyCoding commented 2 years ago

Thank you for keeping up with this! It should be released in the next version