Skip to content

Commit

Permalink
Fix bug in Schema.__absinthe_types__(:all) for Persistent Term (#1161)
Browse files Browse the repository at this point in the history
* Demonstrate bug with persistent term types

* Fix persistent term bug in typelist

* Update changelog
  • Loading branch information
maartenvanvliet committed Feb 22, 2022
1 parent a2223a6 commit fa20603
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Changelog

## Unreleased
- Bug Fix: [Add `__private__` field to EnumValueDefinition](https://github.com/absinthe-graphql/absinthe/pull/1148)

- Bug Fix: [Add `__private__` field to EnumValueDefinition](https://github.com/absinthe-graphql/absinthe/pull/1148)
- Bug Fix: [Fix bug in Schema.**absinthe_types**(:all) for Persistent Term](https://github.com/absinthe-graphql/absinthe/pull/1161)

## 1.7.0

Expand Down
2 changes: 1 addition & 1 deletion lib/absinthe/phase/schema/populate_persistent_term.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if Code.ensure_loaded?(:persistent_term) do
type_list =
for %{identifier: identifier} = type <- schema.type_definitions,
into: %{},
do: {identifier, type.__reference__}
do: {identifier, type.name}

types_map =
schema.type_artifacts
Expand Down
1 change: 1 addition & 0 deletions test/absinthe/type/object_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ defmodule Absinthe.Type.ObjectTest do

defmodule Schema do
use Absinthe.Schema
use Absinthe.Fixture

query do
# Must exist
Expand Down

0 comments on commit fa20603

Please sign in to comment.