Closed hesedel closed 5 years ago
@hesedel could you share the query that gives you this warning?
@hesedel I recently had the same issue. It's an Apollo issue rather than DatoCMS from what I can tell. You need to download your schema and load it into Apollo, this issue will then be solved. See here https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher
@stefanoverna here's the query:
some stored variables:
const ContentRecord = `
... on ContentRecord {
id
_modelApiKey
contentType {
... on ContentTypeBannerRecord {
id
_modelApiKey
heading
buttonText
href
backgroundColor {
... on ColorField {
hex
}
}
}
... on ContentTypeDefaultRecord {
id
_modelApiKey
layout
tag
heading
subheading
text
buttonText
href
media {
${FileField}
}
}
... on ContentTypeGalleryRecord {
id
_modelApiKey
layout
heading
text
media {
${FileField}
}
}
... on ContentTypeIframeRecord {
id
_modelApiKey
src
width
height
media {
${FileField}
}
}
... on ContentTypeVideoRecord {
id
_modelApiKey
video {
${FileField}
}
width
height
image {
${FileField}
}
}
}
countryBlacklist {
... on CountryRecord {
id
_modelApiKey
name
}
}
}
`;
const SlideRecord = `
... on SlideRecord {
id
_modelApiKey
slideType {
... on SlideTypeDefaultRecord {
id
_modelApiKey
heading
buttonText
href
media {
${FileField}
}
cropped
}
}
}
`;
The main query:
{
allPages(
filter: {
id: {
eq: "${id}"
}
}
) {
id
_modelApiKey
title
hero {
id
_modelApiKey
heroType {
... on HeroTypeSliderRecord {
id
_modelApiKey
slides {
${SlideRecord}
}
}
}
}
content {
... on ContentSectionRecord {
id
_modelApiKey
content {
${ContentRecord}
${SlideRecord}
${SliderRecord}
}
}
}
}
}
@sbc3 Thanks for the suggestion, will look into this.
Please reopen this if this is really a bug on our side!
I mixed two different models for Multiple Links field and although fetching the data works, I'm getting this warning in the console.
one model has a field called contentType, the other one has a field called slideType