diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d1bd8..c57d44a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.4.3 - 2024-09-27 + +### Fixed + +* Fixes where NonNull and ListTypes were defaulting to scalar types for anchor links + ## 0.4.2 - 2024-09-26 ### Fixed diff --git a/README.md b/README.md index 814682e..49f5ae6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ by adding `graphql_markdown` to your list of dependencies in `mix.exs`: ```elixir def deps do [ - {:graphql_markdown, "~> 0.1.2"} + {:graphql_markdown, "~> 0.4.3"} ] end ``` diff --git a/lib/graphql_markdown/schema.ex b/lib/graphql_markdown/schema.ex index 52406ec..ea14a28 100644 --- a/lib/graphql_markdown/schema.ex +++ b/lib/graphql_markdown/schema.ex @@ -64,10 +64,10 @@ defmodule GraphqlMarkdown.Schema do def field_kind(type) do case type["kind"] do "NON_NULL" -> - field_type(type["ofType"]) + field_kind(type["ofType"]) "LIST" -> - field_type(type["ofType"]) + field_kind(type["ofType"]) _ -> type["kind"] diff --git a/mix.exs b/mix.exs index 2444936..b257fb4 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule GraphqlMarkdown.MixProject do use Mix.Project @project_url "https://github.com/podium/graphql_markdown" - @version "0.4.2" + @version "0.4.3" def project do [ diff --git a/test/graphql_markdown_test.exs b/test/graphql_markdown_test.exs index 0783d5b..3ef8403 100644 --- a/test/graphql_markdown_test.exs +++ b/test/graphql_markdown_test.exs @@ -80,7 +80,7 @@ defmodule GraphqlMarkdownTest do # anchors need to be downcased to match other parts of the generated markdown content = File.read!("guides/queries.md") - assert content =~ "Type: [Droid](scalars.html#droid)" + assert content =~ "Type: [Droid](objects.html#droid)" # union types need to be a valid type for links content = File.read!("guides/mutations.md")