feat: adding form functionality to e-commerce template that includes GraphQL queries
Description
The documentation and examples for implementing form functionality in Payload are currently incomplete, since they're missing the relevant GraphQL queries and other front end fixes that are required to render forms. I've added the functionality to the ecommerce template to serve as an up-to-date example within the template where forms are most desirable from a starting point.
This was discussed in the following thread in the Payload discord channel
Duly updates could be applied to the ./docs and ./examples directories in the future upon request by the Payload team.
A known issue exists where the Checkbox field cannot request a defaultValue within its GraphQL query because it lacks the requisite independent type definition. GraphQL throws the following error due to conflicting types between Checkbox and other fields.
"Fields "defaultValue" conflict because they return conflicting types "String" and "Boolean". Use different aliases on the fields to fetch both if this was intentional."
- [x] I have read and understand the CONTRIBUTING.md document in this repository.
Type of change
- [x] New feature (non-breaking change which adds functionality)
- [x] Change to the templates directory (does not affect core functionality)