Open wilr opened 7 years ago
Started work for this in https://github.com/silverstripe/silverstripe-graphql/compare/features/11-form-submission-api. Blocked based on Framework updates now.
See RFC 19 (https://github.com/silverstripe/silverstripe-framework/issues/6362) for the required precursor to this work.
We've decided to put this work on hold for now - the first step is the Update models after GraphQL submissions work, which would allow any XHR submission to influence Apollo model caching and make actual GraphQL form submissions less of a priority.
Form submissions through GraphQL will make a lot more sense once we can (optionally) bind PHP forms to models, and return GraphQL types rather than just generic key/value form submission results.
Updated title from "Asset Details Form submits Through GraphQL" to "Form submissions to GraphQL" (which was its original title), basically making this a generic card again. Once we get around to it, we might make the "asset details form" the first implementation, but it doesn't change the underlying work involved.
Was there any conclusion about this? I mean, a way to do form submissions through GraphQL?
Was there any conclusion about this? I mean, a way to do form submissions through GraphQL?
Also waiting for the update on this.
As a developer, I want form submissions to go through GraphQL, so I can have a consistent API.
Tasks
submitForm
mutationformSubmission
andformResult
GraphQL types for handling forms incoming and outgoing. They should take / return the schema as well.FileFormFactory
/AssetFormFactory
based on the framework dependancy.Related
Assumptions
formSubmission
key => value should simply be strings not strictly typed.formResult
should simply return a list of object classname / id's to update / or theformResult
could return an instance of the graphql type. We'll resolve the issue of mapping those to particular queries later.