improvement: include primary key when managed relationship can update

This commit is contained in:
Zach Daniel 2023-03-21 23:20:15 -04:00
parent e4dda5a3d9
commit fc1433170e

View file

@ -1721,9 +1721,8 @@ defmodule AshGraphql.Resource do
resource = relationship.destination
could_lookup? = ManagedRelationshipHelpers.could_lookup?(opts)
could_match? = ManagedRelationshipHelpers.could_update?(opts)
needs_pkey? = opts[:on_no_match] == :match
if could_lookup? || (could_match? && needs_pkey?) do
if could_lookup? || could_match? do
pkey_fields =
if managed_relationship.lookup_with_primary_key? do
resource