apollo
apollo copied to clipboard
Graphql fragments which contain child elements do not return any subset data
Description
Here is an example fragment for a field that contains child elements:
fragment landingPageBuilderFrag on landingPageBuilder_MatrixField {
... on landingPageBuilder_sectionHeadline_BlockType {
typeHandle
sectionTitle
headline
introduction
}
... on landingPageBuilder_logoParade_BlockType {
typeHandle
organisations {
url
title
slug
id
uri
... on organisations_organisation_Entry {
logo {
extension
width
height
url
id
title
srcset(sizes: ["100", "300", "400"])
}
}
}
}
... on landingPageBuilder_faqs_BlockType {
typeHandle
faqs {
... on faqs_BlockType {
question
answer
}
}
callToAction {
... on callToAction_BlockType {
... callToActionSuperTableFrag
}
}
}
}
I would like to then use this fragment for multiple entry types which contain this field, for example:
... on homepage_homepage_Entry {
landingPageBuilder {
...landingPageBuilderFrag
}
}
In the GraphiQL explorer and in Postman, this works fine as expected. But when queried via our Nuxt Apollo app it returns an array for each child element but without its subset contents. here is a screenshot of the response in the console:

as you can see non of the subset data is returned for any of the sub-blocks.
Additional info
- @nuxtjs/apollo: ^4.0.1-rc.5,
- nuxt: ^2.15.4,
Had the same issue on the current alpha8 release.
@toddpadwick did you resolve the problem?