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

Form submissions through GraphQL #17

Open
3 tasks
wilr opened this issue Nov 24, 2016 · 6 comments
Open
3 tasks

Form submissions through GraphQL #17

wilr opened this issue Nov 24, 2016 · 6 comments

Comments

@wilr
Copy link
Member

wilr commented Nov 24, 2016

As a developer, I want form submissions to go through GraphQL, so I can have a consistent API.

Tasks

  • Define submitForm mutation
  • Define formSubmission and formResult GraphQL types for handling forms incoming and outgoing. They should take / return the schema as well.
  • Update FileFormFactory / AssetFormFactory based on the framework dependancy.

Related

Assumptions

  • formSubmission key => value should simply be strings not strictly typed.
  • Change tracking / field notification does not need to be flash. The formResult should simply return a list of object classname / id's to update / or the formResult could return an instance of the graphql type. We'll resolve the issue of mapping those to particular queries later.
@wilr wilr self-assigned this Nov 24, 2016
@wilr wilr added this to the CMS 4.0.0-alpha4 milestone Nov 24, 2016
@sminnee sminnee changed the title Submit Forms Through GraphQL Asset Details Form submits Through GraphQL Nov 25, 2016
@wilr
Copy link
Member Author

wilr commented Nov 29, 2016

Started work for this in https://github.com/silverstripe/silverstripe-graphql/compare/features/11-form-submission-api. Blocked based on Framework updates now.

@wilr
Copy link
Member Author

wilr commented Dec 19, 2016

See RFC 19 (silverstripe/silverstripe-framework#6362) for the required precursor to this work.

@chillu
Copy link
Member

chillu commented Dec 21, 2016

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.

@chillu chillu changed the title Asset Details Form submits Through GraphQL Form submissions through GraphQL Dec 21, 2016
@chillu
Copy link
Member

chillu commented Dec 21, 2016

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.

@palomamtnez
Copy link

Was there any conclusion about this?
I mean, a way to do form submissions through GraphQL?

@RileyManda
Copy link

Was there any conclusion about this? I mean, a way to do form submissions through GraphQL?

Also waiting for the update on this.

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

No branches or pull requests

7 participants