Wire up GraphQL query to dynamic form
What does this MR do?
Populate SAST Configuration via GraphQL
Part of the SAST Configuration UI feature, this adds a GraphQL
query to the SAST Configuration UI application, and feeds a transformed
copy of the response to the DynamicFields
component in order to
render the form fields.
The usage of DynamicFields
in this change is not ideal, but is only
written this way for now to demonstrate the data flow. This will be
improved in a related MR soon. Specifically, what's not ideal:
- It currently mutates the fetched GraphQL response, rather than working with a copy of it.
- It's not contained within a
form
element, and there's no way (yet) to submit the form data.
Other changes include:
- Replace Bootstrap utility class with one from GitLab UI.
- Extract helper for populating data for the frontend.
- Change subheading text to match latest design.
- Move documentation link into subheading.
- Add error state for app component.
Addresses #231372 (closed).
Screenshots
Note that, as of writing, the backend MR which would drive this hasn't been merged yet. These screenshots have been created by merging in that branch first. This MR is not blocked by that, though, as it's behind a feature flag.
State | Screenshot |
---|---|
Loading | |
Loaded | |
Error |
Draft
This MR is in Draft, as it's blocked by !38162 (merged).
Feature flag
While this component isn't used anywhere yet, it will be used in the SAST Configuration UI page, which itself is behind the sast_configuration_ui
feature flag.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done