Join the Webstudio community

Updated 4 months ago

graphql slug with flotiq

At a glance
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
}
}
1
B
A
J
21 comments
Does it work in graphql editor in flotiq?
no i cant see any filtering around slugs
So it's not related to webstudio?
ok i was able to request using slug as a query parameter
but this was just on flotiq endpoint but im not able to do the same using grahpql is my setup incorrect above
Maybe they do not have support for slug in graphql?
Seems not I will post to them as the resource API request also doesn't have support for reducing the response. I can only pull it all πŸ˜„
I was talking to them about making a template potentially.. curious what your reason was for choosing it so I can best understand the use case
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.
Added as a suggestion to improve this
so basically they let you. manage your slugs/ids
could you have done it differently from the beginning if you knew?
sounds like you need to write a script and change those for everything
I would try AI in your place to generate you that script
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.
sounds like a problem with slotiq, maybe they should share their plan, how they thought this is going to be used
and why they didn't account for this
Add a reply
Sign up and join the conversation on Discord