Skip to content

Commit

Permalink
Stable introspection Part absinthe-graphql#1
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrenner committed Jun 21, 2021
1 parent 50384fe commit 314c318
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/absinthe/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ defmodule Absinthe.Schema do
def types(schema) do
schema.__absinthe_types__
|> Map.keys()
|> Enum.sort()
|> Enum.map(&lookup_type(schema, &1))
end

Expand Down Expand Up @@ -541,6 +542,7 @@ defmodule Absinthe.Schema do
def directives(schema) do
schema.__absinthe_directives__
|> Map.keys()
|> Enum.sort()
|> Enum.map(&lookup_directive(schema, &1))
end

Expand Down
2 changes: 1 addition & 1 deletion lib/absinthe/type/built_ins/introspection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ defmodule Absinthe.Type.BuiltIns.Introspection do
end
end)

{:ok, result}
{:ok, Enum.sort_by(result, & &1.identifier)}

_, _ ->
{:ok, nil}
Expand Down

0 comments on commit 314c318

Please sign in to comment.