The community members are attempting to update a page based on the slug using Flotiq, but they are unable to request data using a slug in GraphQL. They can do it with an ID, but not with a slug. The community members tried various approaches, including using the GraphQL editor and the REST API, but they were unable to find a way to filter by slug in GraphQL. Flotiq support informed them that they have two "get" request types: singular and multi-item list. For slug, they would want to use the singular request, but it doesn't support anything other than ID as a filter. The only solution Flotiq provided was to manually update the IDs to the slugs for each entry, which is not feasible for a large number of pages. The community members suggest that Flotiq should consider improving their support for slug-based filtering in GraphQL.
Hello! I'm attempting to update a page based on the slug but i cant seem to request data using a slug with flotiq. I can do it with ID any info on how to do this
works query{ blog_post(id: xxxxxxxxxx){ title header_image{url} blog_content } }
doesnot query{ blog_post(slug: xxxxxxxxxx){ title header_image{url} blog_content } }
sadly it wasnt my choice. it was a decision by the team im working with as they found it fit for their purpose. their list of things that made it the choice: Price, it has a no code setup, it has rest API with the ability to put images in rich text and you can still customise it somewhat
Spoke to flotiq. They have 2 "get" request types. singular and multi item list. For slug i would want to use singular as its more efficent than searching all the data and filtering but it doesn't support anything other than ID as a filter. The response I got back is to make an update request to each of my item ids and change them to my slug. This cant be done on the FE so will need to be done manually per entry. Sadly its a bit of a limitation if you have large amount of pages to filter through.
just an update for anyone else having a similar problem.
yeah i would have to run a script for every blog created. For me its not much of a problem as we are a small team but for scalability it would be better to amend it seeing as slug is so common
There was no way to do it differently apart from using the list request which sifts through all the data and with a large table it can become a problem.