-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
scope/pluginsscope/schema-contexttheme/feedbackRelated to better messages, errors, more contextual, etc.Related to better messages, errors, more contextual, etc.type/featAdd a new capability or enhance an existing oneAdd a new capability or enhance an existing one
Description
Perceived Problem
- https://github.com/graphql-nexus/nexus/pull/1295#discussion_r461447486
- we use declaration merging to merge different context contributions
- if any fields overlap but have different types there will be a hard TS error
- if developer is the overrider but doesn't know about the pre-existnig type he may be confused about what is going on
- if the developer provided the existing type but a plugin overrides he/she may be confused about what is going on
- if developer did nothing, but two plugins collide, he/she may be even more confused about what is going on
Ideas / Proposed Solution(s)
-
clear feedback when collisions happen
- Where did the current entry come from?
- Where dit the new conflicting entry come from?
-
if we want to allow runtime to do context entry overwriting (not deep merging but literally wipe out the previous value) then we need a custom type merge instead of relying on declaration merging
Metadata
Metadata
Assignees
Labels
scope/pluginsscope/schema-contexttheme/feedbackRelated to better messages, errors, more contextual, etc.Related to better messages, errors, more contextual, etc.type/featAdd a new capability or enhance an existing oneAdd a new capability or enhance an existing one