Skip to content

Resolver uses FormBiulderAPI with DataObject that is not supported by GraphQL Query #6

@briscoda

Description

@briscoda

When the resolver calls the form repository here:

return $this->formbuilder->getAvailableFormById((int)$args['form_id'], $customerGroupId, $store->getId());

the formbuilder repository sets "DesignFields" but the graphql schema is looking for "design", so there is an error:
Screen Shot 2022-04-24 at 11 35 49 AM

If you just change the schema to include "design_fields" then you get this result:
Screen Shot 2022-04-24 at 11 28 31 AM

I think this is because the formRepository is using a DataObject which is nesting the field data in an array of values needing getData calls on them which GraphQl doesn't seem to be able to handle correctly.

In the FormBuilderRepository here: src/app/code/Lof/Formbuilder/Model/FormbuilderRepository.php:694

If you apply the field names directly into an array and bypass the DataObject then you get all of the values back correctly.

I was wondering if anyone else has reported this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions