ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

[Feature] create a GraphQL port #123

Closed websitevirtuoso closed 4 years ago

websitevirtuoso commented 4 years ago

I have laravel Grapqhl (rebing package) it works as API service. And Vuejs App. Does it possible to use this package for me? (I already read all info and cant find solution for my case) Can you guide me?

ctf0 commented 4 years ago

the issue with graphql as far as i know, u need a client which means we need to port whatever axios currently does to the graphql client.

for the backend we also need to change the current request handling from laravel to the graphql package "server".

atm we use dropzone which use rest and handle the uploading on its own, i believe most of the libs does that but i havent checked if it works with graphql or not & what it actually need to make the transition.

i want to help u as i also want to get more involved in graphql but sadly i dont have time to rebuild the whole project from ground up again just to test graphql capabilities

websitevirtuoso commented 4 years ago

Yes my client is Appollo because it is the most popular client for graphql

In my API I could try response anything but I need to know current response structure from current implementation and you as creator should know it.

I could try to implement it if you guide me a little bit. What should I review and may be change....

websitevirtuoso commented 4 years ago

I have one good article https://codeburst.io/upload-and-manage-files-with-laravel-and-vue-915378c8b2a4

I could remove axious and use my own graphql routes. But I dont familiar with your package. But I really love it and want to try use it

ctf0 commented 4 years ago

awesome, i would love to aswell. here is what i think u might need as a starting point

websitevirtuoso commented 4 years ago

Awesome. I will start implementing and later will give you know about my results

websitevirtuoso commented 4 years ago

I think that I will separate your package at 2. Front and back. And if it will success will give you a repo

ctf0 commented 4 years ago

i honestly wanted to separate the 2 packages from the very beginning, but because i use a lot of inline-templates, it didnt make sense to separate them,

still i would recommend to keep this as phase 2 "to make sure that everything works as u expect first"

websitevirtuoso commented 4 years ago

I review codebase and to separate fronted from laravel I need rewrite file _manager.blade.php It is a lot of work. Right now I found a way a bit easier. Is using if iframe or wrap main route to my graphql route.

Before implementing grahpql we should separate this package to vuejs and laravel api. After this we can try to implement graphql rebing or lighthouse.

ctf0 commented 4 years ago

i might be wrong but shouldn't the graphql works by only replacing

do u still need to do extra changes ? if so we need to come up with a plan on how to keep the graphql port updated same as the main port axios because there are still some changes/enhancement i need to add & i really hope if we could avoid maintaining 2 code bases.

ctf0 commented 4 years ago

@websitevirtuoso are u still into this or should we close it ?

websitevirtuoso commented 4 years ago

@ctf0 No I could implement in another way. I didn't start do migration because I should rewrite too much because it has big connection with laravel