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

Failing test for empty query sdl render bug #1104

Conversation

kdawgwilk
Copy link
Contributor

@kdawgwilk kdawgwilk commented Sep 24, 2021

Example for #1105

@binaryseed
Copy link
Contributor

I don't think this is a valid schema - the root query type can't be empty. What did you do to encounter the inspect failure?

@kdawgwilk
Copy link
Contributor Author

Wouldn't the schema fail to compile in the tests if it was invalid?

@binaryseed
Copy link
Contributor

http://spec.graphql.org/draft/#sec-Objects.Type-Validation

An Object type must define one or more fields

It might be that Absinthe doesn't currently have a compile time validation for this part of the spec

@benwilson512
Copy link
Contributor

@binaryseed I think this is related to that, but we may want to handle it a bit differently. There are certain schemas that are in valid in such a way where we can't meaningfully render them, but right now it tries to anyway if we inspect. We need some sort of fallback when inspecting because otherwise it is difficult to debug invalid schemas.

@kdawgwilk
Copy link
Contributor Author

Resolved by #1167

@kdawgwilk kdawgwilk closed this Apr 29, 2022
@kdawgwilk kdawgwilk deleted the kaden/empty_query_sdl_render_bug branch April 29, 2022 18:18
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 this pull request may close these issues.

3 participants