Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve Adams 5 posts 95 karma points
    Nov 15, 2022 @ 03:10
    Steve Adams
    0

    Querying for nested BlockList content

    Hi all,

    Newbie trying to get my head around Heartcore and writing GraphQL queries.

    I'm having an issue where my document type has a property that is using a BlockList editor. The BlockList editor supports adding a number of different types of Elements.

    As long as those elements themselves do not have a property that is also using a BlockList editor, their content is returned successfully in GraphQL queries.

    If I add an Element to the Content that contains it's own property with a BlockList editor, then that content is ignored by GraphQL completly as if the content has not been added.

    So it seems that GraphQL is baulking at nested BlockList content.

    I've tried searching to docs for an explanation of this but have not been able to find any.

    Has anyone else been able to successfully retrieve nested BlockList content via GraphQL queries?

  • Lindow 154 posts 1301 karma points
    Nov 21, 2022 @ 08:05
    Lindow
    0

    Hi Steve

    Yes, it worked for me the last time I've tried.

    Please, reach out to our support via the portal page if you're still experiencing issues with querying data :)

  • Steve Adams 5 posts 95 karma points
    Nov 23, 2022 @ 09:25
    Steve Adams
    100

    I reached out and after several messages going back and forward, I was not able to resolve the issue.

    I did however eventually solve the issue myself as I replicated it on another instance of Umbraco Heartcore.

    The issue is that if you simply modify a Block List configuration by adding new elements to it, then the new elements are immediately available when editing any item that has a property using the updated Block List configuration.

    However, none of the data for the new elements is returned by either a GraphQL query or an API call UNTIL you re-save the document type with the property using the Block List configuration.

    Once the document type is re-saved, both the GraphQL queries and API calls then return the data including the new elements added to the Block List configuration.

    I would consider that having to resave any document types using the updated Block List configuration before the data is queryable to be a bug, but this is a work around that seems to resolve the problem for me.

  • Lindow 154 posts 1301 karma points
    Nov 23, 2022 @ 09:32
    Lindow
    0

    Nice to hear that you've figured it out :)

    Yes, I agree that this is a bug.

    Could you please log a bug report on our Heartcore issue tracker, so that we can add it to a dev sprint?

    https://github.com/umbraco/Umbraco.Heartcore.Issues/issues/new?assignees=&labels=&template=1.+Umbraco+Heartcore.yml

Please Sign in or register to post replies

Write your reply to:

Draft