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

Bug fix - implement missing parser validation for interface and object having missing fields #845

Merged

Conversation

tinnou
Copy link
Contributor

@tinnou tinnou commented Mar 26, 2024

Description

The parser is a bit lenient around letting types being defined without fields.

The example below should fail parsing but doesn't today:

type User {
}

This PR implements the missing validation to bail parsing for object types and interfaces when defined as empty (within curly braces).

The parser already implemented this validation for enum and input types.

@tinnou tinnou force-pushed the parser-validation-missing-fields branch from a4246c6 to a4bf64e Compare March 26, 2024 22:03
Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect! 🥳 thank you!

@goto-bus-stop goto-bus-stop merged commit 3027bae into apollographql:main Apr 2, 2024
12 checks passed
@goto-bus-stop goto-bus-stop mentioned this pull request Apr 8, 2024
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.

2 participants