You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
i created a simple image field at cms
when i deleted the image from cms admin
its sets to empty on my json file
{ image:"} and start to got this error message
Field "image" must not have a selection since type "String" has no subfields Please replace with a clear and descriptive title
from graphql queries at page
there is a way to tell the widget to remove the field from json file
i already have the custom type defined
gastby-node.js
at exports.createSchemaCustomization
like this
type MemberCompanyNode {
id: String
big_logo: String
name: String
}
type CompanyNode {
image: File @fileByRelativePath
paragraph1: String
paragraph2: String
link: String
memberCompany: MemberCompanyNode
}
type OSFMemberNode {
osfMember: CompanyNode
}
type MemberSpotLiteSectionJson implements Node {
companies: [OSFMemberNode]
}
also i tried to create a custom resolver
at gastby node.js
exports.createResolvers
createResolvers({
MemberSpotliteSectionJsonCompaniesOsfMember: {
image: {
type: "File",
resolve: (source) => {
console.log(`MemberSpotliteSectionJsonCompaniesOsfMember`,source.image)
(source?.image?.publicURL ? source.image : {publicURL:null})
},
},
},
});
but i got warn `createResolvers` passed resolvers for field `MemberSpotliteSectionJsonCompaniesOsfMember.image` with type `File`. Such a field with type `String` already exists on the type. Use `createTypes` to override type
fields.
really i am stuck at this
there is no simple way to delete an image at CMS and keep it working ?
much thanks
The text was updated successfully, but these errors were encountered:
smarcet
changed the title
Field "image" must not have a selection since type "String" has no subfields Please replace with a clear and descriptive title
Delete image from CMS admin breaks GraphQL queries
Apr 20, 2024
Hello
i created a simple image field at cms
when i deleted the image from cms admin
its sets to empty on my json file
{ image:"} and start to got this error message
Field "image" must not have a selection since type "String" has no subfields Please replace with a clear and descriptive title
from graphql queries at page
there is a way to tell the widget to remove the field from json file
i already have the custom type defined
gastby-node.js
at exports.createSchemaCustomization
like this
and graphql query at page is
also i tried to create a custom resolver
at gastby node.js
exports.createResolvers
The text was updated successfully, but these errors were encountered: