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

Feature Request/Feedback: JSON form vs a JSON editor #160

Open
JJediny opened this issue Feb 2, 2021 · 1 comment
Open

Feature Request/Feedback: JSON form vs a JSON editor #160

JJediny opened this issue Feb 2, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@JJediny
Copy link

JJediny commented Feb 2, 2021

I know the project is still under active development.

After getting the docker-compose setup of the project running, I tried adding a new data source:

  • Each source has a set JSON schema for it's handler config based on graphql-mesh. I was expecting to use yaml, but it looks like it only accepts a JSON input based purely off the schema. Is that correct?
  • Are there plans to provide:
    ** 1. An default JSON object to edit from (right now its blank) or autogenerated from the schema directly to pre-populate the editor with at least the required fields.
    ** 2. Switch using a JSON editor to a JSON schema generated form (that supports ajv also) - like https://github.com/rjsf-team/react-jsonschema-form

All just suggestions, so feel free to close the issue

for reference only
https://github.com/Urigo/graphql-mesh/blob/master/packages/types/src/config-schema.json
https://github.com/JJediny/json2yaml-editor/blob/gh-pages/ref/graphql-mesh-meshrc.json
http://jjediny.github.io/json2yaml-editor/

@valcker valcker self-assigned this Feb 3, 2021
@valcker valcker added the enhancement New feature or request label Feb 3, 2021
@valcker
Copy link
Member

valcker commented Feb 3, 2021

Hi @JJediny 👋

I know the project is still under active development.

Indeed it is but we really appreciate your feedback!

Each source has a set JSON schema for it's handler config based on graphql-mesh. I was expecting to use yaml, but it looks like it only accepts a JSON input based purely off the schema. Is that correct?

Yes, that's correct. In fact, we are using JSON editor only as a temporary solution while we are working on dedicated forms for all data sources. So it's not something that will stick for a long time (at least not as a primary way of creating/editing the entities).

Are there plans to provide:
** 1. An default JSON object to edit from (right now its blank) or autogenerated from the schema directly to pre-populate > the editor with at least the required fields.

Yes, that might be possible.

** 2. Switch using a JSON editor to a JSON schema generated form (that supports ajv also) - like https://github.com/rjsf-team/react-jsonschema-form

In fact, we are working on that right now. We are, however, building some of the forms manually because the auto-generated UI doesn't always look great, but we are also looking at JSON Schema form generator.

The forms should be ready around this week (if all goes well 🤞).

@valcker valcker modified the milestones: backlog, graphql-portal-1.0 Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants