Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Enable GraphQL text fields to contain WYSIWYG/Pagebuilder content (as complex object) #45

Closed
misha-kotov opened this issue May 21, 2018 · 3 comments
Assignees
Labels

Comments

@misha-kotov
Copy link

misha-kotov commented May 21, 2018

As a developer I want be able to add different response format for content fields in product, CMS, and Category API. Currently the API returns simple type (string), but in the future we may want to return HTML and/or JSON for more convenient processing by web apps.

Acceptance Criteria

  • Modify all fields of type textarea in Products GraphQL API to return an object instead of simple type so later data can be extended and retrieved in JSON format.
  • Add a new attribute named format within each object, with two possible values (for now): html and json (potentially to be expanded later)
  • By default complex object contains only string format, property value is html
  • It is not necessary to modify the responses to return json values in the scope of this story
  • Changes are covered with web API functional tests. See \Magento\GraphQl\Catalog\ProductViewTest::testQueryAllFieldsSimpleProduct as an example.

Example
Before

type ProductInterface {
...
name: String
...
}

After

type ProductInterface {
   ...
   name: ComplexTextValue
   ...
}

type ComplexTextValue {
   html: String!   
   # this list can be expanded later, like adding json format 
}
@misha-kotov misha-kotov added for-grooming This issue needs to be discussed before it can be worked on additional-coverage labels May 21, 2018
@melnikovi
Copy link
Member

Need to discuss AC before we start implementation.

@misha-kotov
Copy link
Author

@melnikovi please provide list of Pagebuilder fields that need to be modified on each entity.
Then the issue will be "ready to start"

@melnikovi
Copy link
Member

We need to do this for all EAV attributes of type textarea.

@misha-kotov misha-kotov changed the title Enable Product text fields to contain WYSIWYG/Pagebuilder content (as complex object) Enable text fields to contain WYSIWYG/Pagebuilder content (as complex object) Sep 4, 2018
@misha-kotov misha-kotov changed the title Enable text fields to contain WYSIWYG/Pagebuilder content (as complex object) Enable GraphQL text fields to contain WYSIWYG/Pagebuilder content (as complex object) Sep 4, 2018
@misha-kotov misha-kotov added small and removed medium labels Sep 4, 2018
@VitaliyBoyko VitaliyBoyko self-assigned this Sep 5, 2018
@misha-kotov misha-kotov removed the for-grooming This issue needs to be discussed before it can be worked on label Oct 19, 2018
@naydav naydav closed this as completed Nov 13, 2018
@naydav naydav added this to the Release: 2.3.1 milestone Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants