GraphQL select product with categories
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
GraphQL select product with categories
You have an example GraphSQL query here:
https://aimeos.org/docs/2024.x/admin/graphql/product/
It works, but the result does not contain any categories or images. How can I include categories and images?
Also when I tried to register using username and password, then it would not let me register, because it said that "captcha solution was wrong" while in reality it was correct.
https://aimeos.org/docs/2024.x/admin/graphql/product/
It works, but the result does not contain any categories or images. How can I include categories and images?
Also when I tried to register using username and password, then it would not let me register, because it said that "captcha solution was wrong" while in reality it was correct.
Re: GraphQL select product with categories
Please have a look here:matish wrote: ↑04 Nov 2025, 11:54 You have an example GraphSQL query here:
https://aimeos.org/docs/2024.x/admin/graphql/product/
It works, but the result does not contain any categories or images. How can I include categories and images?
https://aimeos.org/docs/2024.x/admin/gr ... -resources
Do you mean the captcha when registering in the forum?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
Re: GraphQL select product with categories
Yes, exactly. I resolve the captcha and press register. But it said that captcha was resolved incorrectly. Seems like some kind of implementation issue.Do you mean the captcha when registering in the forum?
Anyway I got product selections and inserts working finally. Do you know any good libraries for generating GraphQL commands? It took a while to make a simple generator, because it does not seem smart to write each command manually like this:
Code: Select all
{
searchProducts(
filter: "{\"==\":{\"product.code\":\"21HD007H\"}}"
include: [
"text"
"product/property"
"stock"
"catalog"
"media"
"attribute"
]
) {
items {
id
siteid
type
code
label
url
dataset
datestart
dateend
config
instock
scale
status
target
boost
mtime
ctime
editor
lists {
text {
id
item {
id
content
type
domain
label
}
}
catalog {
id
siteid
parentid
}
media {
id
siteid
type
}
attribute {
id
item {
id
type
siteid
domain
code
label
}
}
}
property {
id
type
languageid
value
}
stock {
id
type
stocklevel
timeframe
dateback
}
}
total
}
}
Re: GraphQL select product with categories
For PHP, there are almost no libraries for building GraphQL requests compared to Javascript, which has Apollo. The best one seems to be: https://github.com/softonic/graphql-client
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
Re: GraphQL select product with categories
Ok, thanks for the suggestion. I already have it. Unfortunately it does not do the query formatting. I would actually like to try HTMX instead of javascript, because there is so much javascript already that some pages are slow because of that. Unfortunately GraphQL responses do not fit, since it expects the responses to be pure HTML.