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

Graphql? #6

Closed
pomazanbohdan opened this issue Feb 19, 2019 · 3 comments
Closed

Graphql? #6

pomazanbohdan opened this issue Feb 19, 2019 · 3 comments

Comments

@pomazanbohdan
Copy link

Hey.
On VUE there is no admin which can work with graphql api.
Maybe it would be a good decision to add support?

@szczepanmasny
Copy link
Member

Hi, thank you very much for this suggestion! It forced me to get acquainted with the GraphQL specification and to check if stable backend libraries supporting this language are available.
GraphQL will solve my overfetching problems and reduce the amount of code in my APIs, so I will definitely add GraphQL support to the project.
If Vue CRUD with GraphQL support would be useful for you and you have an idea how to add this support, I will be grateful for contributing to the project.
I'll try to take care of it next week.

@pomazanbohdan
Copy link
Author

pomazanbohdan commented Feb 20, 2019

Glad you liked it.
In my opinion, GraphQL is becoming a standard in implementing APIs and for managing data more and more requests.
I recommend first to get acquainted with the project, As the most functional of the implementations of admin panels to GraphQL:
https://github.com/marmelab/react-admin and https://github.com/zifnab87/ra-component-factory

What questions arise immediately when you connect the admin panel to api?

  • Users
  • Roles
  • Access rights

Of course it should take on the API.
Now the project https://github.com/hasura/graphql-engine becomes popular.

  1. It develops very quickly and does not require manual writing of schemas.
    I, as a person who can raise this all, but is difficult with programming, there is a problem with the description of react-admin....
  2. Api has this feature:
    If you "set" a tool (for example https://insomnia.rest/) on an existing point, then it can read the entire structure and what this point can provide.

My "idea" is to use this feature, the admin interface tool could make the primary configuration:

  • Create a list of sections (entities)
  • Subtract fields in these entities
  • Build the skeleton of the configuration file based on this information
  • Give the ability to customize the visibility of fields in different modes: listing, editing, adding
  • enable or disable options for the section: import, export, filtering, and so on.

If you take such an implementation, and take the functionality of Hasurа (but optional), where the guys are very responsive, then this product will be Bomb.

@sneko
Copy link

sneko commented Dec 19, 2019

@szczepanmasny instead of implementing in addition to VueResource, Apollo or another request client, I would rather leave the choice to the developer.

For example in the refreshList function:

      Vue.http.get(url).then((response) => {
        const items = response.body
        selectItems = items.map((item) => {

I would use:

        const items = await this.customGetItems();
        selectItems = items.map((item) => {

The developer could give the function pointer while creating the Crud component.

EDIT: and if none is provided, use a default behavior

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

3 participants