mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-19 21:03:09 +12:00
fix: always return a list from pkey_fields (#59)
This commit is contained in:
parent
99a1bfcb8c
commit
e6aadc1221
2 changed files with 3 additions and 2 deletions
|
@ -2872,14 +2872,14 @@ defmodule AshGraphql.Resource do
|
|||
attribute = Ash.Resource.Info.attribute(resource, field)
|
||||
field_type = maybe_wrap_non_null(:id, require?)
|
||||
|
||||
%Absinthe.Blueprint.Schema.FieldDefinition{
|
||||
[%Absinthe.Blueprint.Schema.FieldDefinition{
|
||||
description: attribute.description,
|
||||
identifier: field,
|
||||
module: schema,
|
||||
name: to_string(attribute.name),
|
||||
type: field_type,
|
||||
__reference__: ref(__ENV__)
|
||||
}
|
||||
}]
|
||||
|
||||
fields ->
|
||||
for field <- fields do
|
||||
|
|
|
@ -87,6 +87,7 @@ defmodule AshGraphql.Test.Post do
|
|||
managed_relationship :with_comments, :comments
|
||||
|
||||
managed_relationship :with_comments_and_tags, :comments,
|
||||
lookup_with_primary_key?: true,
|
||||
type_name: :create_post_comment_with_tag
|
||||
|
||||
managed_relationship :with_comments_and_tags, :tags,
|
||||
|
|
Loading…
Reference in a new issue