Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

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

Open
nyteshade opened this issue Feb 25, 2018 · 1 comment
Labels

Comments

@nyteshade
Copy link

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
Copy link
Member

Yogu commented Mar 5, 2018

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.

@Yogu Yogu added the bug label Mar 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants