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

Validate types implement interfaces #25

Open
bhavinshah7 opened this issue Oct 19, 2022 · 1 comment
Open

Validate types implement interfaces #25

bhavinshah7 opened this issue Oct 19, 2022 · 1 comment

Comments

@bhavinshah7
Copy link
Contributor

bhavinshah7 commented Oct 19, 2022

Add a schema validation rule ensuring object and interface types have all the fields that they need to implement the interfaces they say they implement.

//Object
ObjectTypeDefinition : desc=StringValue? 'type' name=Name implementsInterfaces=ImplementsInterfaces? directives+=Directive* ('{' fieldDefinition+=FieldDefinition* '}')?;
ObjectTypeExtensionDefinition:'extend' 'type' name=Name implementsInterfaces=ImplementsInterfaces? directives+=Directive* ('{' fieldDefinition+=FieldDefinition* '}')? ;

//Interface
InterfaceTypeDefinition : desc=StringValue? 'interface' name=Name implementsInterfaces=ImplementsInterfaces? directives+=Directive* ('{' fieldDefinition+=FieldDefinition* '}')?;

InterfaceTypeExtensionDefinition: 'extend' 'interface' name=Name implementsInterfaces=ImplementsInterfaces? directives+=Directive* ('{' fieldDefinition+=FieldDefinition* '}')?;

Other validations for reference

Add to an existing validation class or link a new validation here

similar validation in graphql-java

@KshitijSharma745
Copy link

Hey @bhavinshah7, I would like to work on this. Can you please assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants