I've run across a couple of issues regarding type deduplication.
Types are deduplicated only in the first? domain
Hereuniq_by/2 gets run only in the first? branch, but not for the other one.
A duplicate type can happen if, e.g., a NewType is used as output in a calculation and argument in a mutation. In this case it appears twice here.
This should be an easy fix, either deduplicating it in global_maps or, probably better, in AshGraphql, but it would actually be probably superseded by a fix to the following issue
Types are not deduplicated across domains
I've run into this while reusing a generic type like
This is something which is supposed to be used across domains, but each domain was generating the GraphQL type for the map. We should probably do a dedup pass at the end instead of doing it per-domain. I'm not an expert on GraphQL blueprints, but if there's the need I can try to tackle this if I get some pointers about where to put my hands.
I've run across a couple of issues regarding type deduplication.
Types are deduplicated only in the
first?
domainHere
uniq_by/2
gets run only in thefirst?
branch, but not for the other one.A duplicate type can happen if, e.g., a NewType is used as output in a calculation and argument in a mutation. In this case it appears twice here.
This should be an easy fix, either deduplicating it in
global_maps
or, probably better, inAshGraphql
, but it would actually be probably superseded by a fix to the following issueTypes are not deduplicated across domains
I've run into this while reusing a generic type like
This is something which is supposed to be used across domains, but each domain was generating the GraphQL type for the map. We should probably do a dedup pass at the end instead of doing it per-domain. I'm not an expert on GraphQL blueprints, but if there's the need I can try to tackle this if I get some pointers about where to put my hands.