dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

feature: Extract interface from `DefaultDgsGraphQLContextBuilder`

Open nallwhy opened this issue 3 years ago • 3 comments

Describe the Feature Request

To support multiple custom contexts, changing DefaultDgsGraphQLContextBuilder with another class should be available.

Describe Preferred Solution

For that, DgsGraphQLContextBuilder interface should be made and many codes that depend on DefaultDgsGraphQLContextBuilder should depend on DgsGraphQLContextBuilder interface.

It meansDefaultDgsGraphQLContextBuilder became a just one of implementation of DgsGraphQLContextBuilder.

Describe Alternatives

I have no idea.

nallwhy avatar Oct 04 '22 08:10 nallwhy

If this idea is OK, I can contribute to it.

nallwhy avatar Oct 04 '22 08:10 nallwhy

I'm not sure I understand the use case. You can already build a custom context using the context builder. I don't quite see the need for a different implementation of the DefaultDgsGraphQLContextBuilder.

srinivasankavitha avatar Oct 04 '22 16:10 srinivasankavitha

Can I build multiple custom context with DefaultDgsGraphQLContextBuilder? As I know, graphql-java supports multiple custom context.

ex) AuthContext, DeviceContext, ...

nallwhy avatar Oct 05 '22 02:10 nallwhy