smallrye / smallrye-graphql

Implementation for MicroProfile GraphQL
Apache License 2.0
155 stars 89 forks source link

Make client CDI plugable #153

Open phillip-kruger opened 4 years ago

phillip-kruger commented 4 years ago

Make the client CDI plugable (like the server)

phillip-kruger commented 4 years ago

Yes, sorry did not add a description yet, just wanted to remind myself. But the DI should be (if possible) pluggable. I have made a change to the server code where I removed CDI from the impl, and delegate the loading of instances to SPI. I added a CDI SPI module (that will be the one we use mostly) but (at least theoretically) we should be able to also use Guice or Spring DI.

There are some other dependencies we possible should also move to be loaded via SPI, like json-b and json-p.

I moved the config out too, so for example, Servlet implementation now provide the config. That should make this lib usable in other frameworks.