Open matinst opened 1 year ago
Hi @matinst!
It's look like you need to get subfields of your image
field.
query {
assets(where: { **** } ) {
+ image { id, filesize, width, height, url }
}
}
Use the IDE to look for the Type Definition or try to find in the Keystone repository.
Hi, I want to use the image in the document field and I use this solution in code =>
AcademyFAQ: list({ access: allowAll, fields: { title: text(), description: document({ formatting: true, links: true, relationships:{ asset:{ listKey:'Asset', label:'Asset', selection:'title image' } } }), assets:relationship({ ref:"Asset.academyFAQ", many:true }) }, }),
Asset: list({ access:allowAll, fields:{ title: text(), image: image({ storage:'minio' }), academyFAQ: relationship({ref:'AcademyFAQ.assets',many:false}) } })
but when I use it, I got this error in the description field after creating data with the image
Field "image" of type "ImageFieldOutput" must have a selection of subfields. Did you mean "image { ... }"?