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

SDL output for union with no types is invalid #1084

Closed
kdawgwilk opened this issue Jul 7, 2021 · 0 comments · Fixed by #1085
Closed

SDL output for union with no types is invalid #1084

kdawgwilk opened this issue Jul 7, 2021 · 0 comments · Fixed by #1085

Comments

@kdawgwilk
Copy link
Contributor

Environment

  • Elixir version (elixir -v): 1.10 or 1.11
  • Absinthe version (mix deps | grep absinthe): 1.6.4 or master branch
  • Client Framework and version (Relay, Apollo, etc): N/A

Expected behavior

union _Entity

Actual behavior

union _Entity = 

Relevant Schema/Middleware Code

In a schema processing phase, I am dynamically creating this union type and in some cases the types list is empty but when I ask Absinthe.Schema.to_sdl(MyApp.Schema) I get = in the output with no types on the other side. Tools like GraphiQL playground dont like this and throw errors

%UnionTypeDefinition{
      __reference__: Notation.build_reference(__ENV__),
      description: "a union of all types that use the @key directive",
      identifier: :_entity,
      module: __MODULE__,
      name: "_Entity",
      types: []
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant