AEB-labs/graphql-weaver

Directives, especially and primarily, default ones, get duplicated for each schema

nyteshade opened this issue · 1 comments

Is there a particular reason why directives are duplicated. Given the Facebook Reference implementation, there is no way to specify a resolve function for a directive. Furthermore all attempts to do so, do so by wrapping all field resolvers with additional logic that checks the astNodes for attached directives.

Can we dedupe the directives?

Yogu commented

In the general case, directives can't just be deduplicated by their names - descriptions and arguments might differ. This is similar to #13 (deduplication for types).

I agree with you however that the specified directives (include and skip) should be deduplicated by default. -> I'll tag this one as bug for the duplication of specified directives, but for custom directive deuplication, we would need an API first.