Closed wtrocki closed 5 years ago
I have done quick investigation and from my side this feature do not provide much value to end users. Calling rest will always require some authentication, base url, specific error handlig etc. so it will be hard to make it useful out of the box.
Additionally this will make generation engine complex with little value. What I think we might do instead is to make ability to move standard crud methods that are generated to custom resolvers. This will allow people to drop any requirements they will have including RESTfull calls. From performance side we should cache both custom and generated resolvers.
TL;DR lets allow devs write it themselves.
Closing as our plans moved away from supporting rest gateway this way.
:+1: to vote on issue Comment with alternative ideas
How
Rest directive can be applied to mutation and queries. Applying rest directive will generate source code that will fetch data from remote server using directive url parameters.
@rest(method:"create", path: "/users/create/")
Questions
Base url support - template based vs generation config?