Skip to content

Commit f2084f5

Browse files
* fix: prevent recursive map type definition infinite compile cycle (#296)
--------- Co-authored-by: Tun Cham Roeun <[email protected]>
1 parent 197f587 commit f2084f5

File tree

5 files changed

+315
-196
lines changed

5 files changed

+315
-196
lines changed

lib/ash_graphql.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ defmodule AshGraphql do
740740
|> unwrap_type()
741741
|> all_attributes_and_arguments(all_domains, already_checked, true)
742742

743-
Ash.Type.NewType.new_type?(type) ->
743+
Ash.Type.NewType.new_type?(type) && type not in already_checked ->
744+
already_checked = [type | already_checked]
744745
constraints = Ash.Type.NewType.constraints(type, constraints)
745746
type = Ash.Type.NewType.subtype_of(type)
746747
nested_attrs(type, all_domains, constraints, already_checked)

0 commit comments

Comments
 (0)