lotr-api icon indicating copy to clipboard operation
lotr-api copied to clipboard

Add GraphQL support

Open gitfrosh opened this issue 5 years ago • 3 comments

Although REST is doing great for The one API, it would be nice to add and expose a GraphQL endpoint in the future.

Any help is appreciated. 🚀

gitfrosh avatar Oct 02 '20 20:10 gitfrosh

This might require some refactoring in your controllers and some helper functions to get all books as an example, are you sure you want this? Don't get me wrong I'd be happy to do it.

WiLLiAM111333 avatar Nov 27 '20 23:11 WiLLiAM111333

I've already started working on it, I'd be happy to change my strategy up if you dont like the small refactors in the PR coming sometime this week.

EDIT: I say we keep the authentication part full REST so we dont get any issues with graphql returning the hashed password as a url query param or something stupid

WiLLiAM111333 avatar Nov 28 '20 00:11 WiLLiAM111333

Hey, just to make sure: I'd like to provide an additional / seperate GraphQL endpoint (maybe something like the-one-api.dev/v2/graphql/), that leaves the existing REST API spec as it is. Of course there might be some refactoring necessary. But if you came up with a first solution, you are welcome to set up a PR. 🚀

gitfrosh avatar Dec 10 '20 15:12 gitfrosh