brainfoolong / form-data-json

A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
https://brainfoolong.github.io/form-data-json
MIT License
57 stars 10 forks source link

Implement FormDataGraphQL #23

Closed KES777 closed 2 years ago

KES777 commented 2 years ago

Is your feature request related to a problem? Please describe. Hi. We have complex forms. For example Company have multiple emails, phones. While we can send this at object like:

{ Company => { name => 'x', phones => [{ phone => '1234' },{ phone => '12345' }], emails => [{...},{...}] } }

We want to do same thing via GraphQL

It would be nice if FormDataJson will be able to send this data at GraphQL format

Describe the solution you'd like https://graphql.org/

brainfoolong commented 2 years ago

Hi, thanks for reaching out again, but sorry - No way to get this in this library.

This library is only intended for JSON usage (As the library name speaks for itself). Furthermore, GraphQL is no data format, it is a query language. It would be the same to ask to implement "Mysql" output into this library, which makes also no sense.

You must write your own abstraction layer, if you need to built GraphQL queries out of some form data.

KES777 commented 2 years ago

I even do not imagine at which direction to goolge. Have you any ideas?

brainfoolong commented 2 years ago

Sorry, this is no language that i've ever used.