Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in Schema.__absinthe_types__(:all) for Persistent Term #1161

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maartenvanvliet Did this solve a warning or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It causes a test failure when the tests are run with PERSISTENT_TERM=true


query do
# Must exist
Expand Down