Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
briscoda opened this issue Apr 24, 2022 · 3 comments

Comments

@briscoda
Copy link

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?

@landofcoder
Copy link
Owner

Dear @briscoda
Thanks you for your report!
We will check issue to verify it is issue to resolve it.

@briscoda
Copy link
Author

Hello, just curious if this is something that was validated or not. Thanks!

@fergusdinh
Copy link
Collaborator

Hi @briscoda
We resolved the issue at here: #7
Please try to update the module again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants