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

Adding an input_object without fields causes schema not to generate and fail silently #1166

Closed
MikaAK opened this issue Apr 25, 2022 · 0 comments · Fixed by #1167
Closed

Comments

@MikaAK
Copy link
Contributor

MikaAK commented Apr 25, 2022

Environment

  • Elixir version (elixir -v): 1.13.3
  • Absinthe version (mix deps | grep absinthe): 1.6.6

When generating the API if you specify an input_object with no fields:

input_object :my_input do
end

The schema will no longer generate but there's no errors so the only way to track it down is start removing queries/mutations to see what generates

Expected behavior

Probably some sort of error would be nice saying there's an empty schema

Actual behavior

Schema just doesn't generate and there's an empty schema in /graphiql

Relevant Schema/Middleware Code

mutation do
  field :hello_world, :string do 
    arg :input, :my_input
  end
end

input_object :my_input do
end
@MikaAK MikaAK changed the title Adding an input_type without fields causes schema not to generate and fail silently Adding an input_object without fields causes schema not to generate and fail silently Apr 25, 2022
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