Commit f821e8a
authored
fix: allow mappers to override root types (Query, Mutation, Subscription) (#10512)
* fix: allow mappers to override root types (Query, Mutation, Subscription)
Previously, root types were checked before mappers, which prevented
mappers from working on root types. This fix moves the mapper check
before the root type check, allowing mappers to override rootValueType
when configured.
This is particularly useful when a GraphQL schema has a root Subscription
type that is also a regular object type (e.g., Stripe subscription),
and you want to use a custom mapper type instead of the default
Record<PropertyKey, never>.
* chore: add changeset for mapper fix1 parent 9e70bcb commit f821e8a
File tree
2 files changed
+16
-4
lines changed- .changeset
- packages/plugins/other/visitor-plugin-common/src
2 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
974 | 982 | | |
975 | 983 | | |
976 | 984 | | |
977 | 985 | | |
978 | 986 | | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
| 987 | + | |
983 | 988 | | |
984 | 989 | | |
985 | 990 | | |
| |||
0 commit comments