graph-quilt / graph-quilt/graphql-xtext

validate default values in InputObjectTypes

Open
#24 2 comments 0 reactions 1 assignee Claimed by @jainrocks View on GitHub
enhancement hacktoberfest hacktoberfest2023
Dominant language
Xtend
Stars
21
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Validate if the [default values](https://github.com/graph-quilt/graphql-xtext/blob/82f5b5adffea5df64b4e953ae2c63a83bdbf66c6/com.intuit.graphql.parent/com.intuit.graphql/src/com/intuit/graphql/GraphQL.xtext#L216) confirm to the NamedType defined in InputObjectTypes.

`InputValueDefinition : desc=StringValue? name=Name ':' namedType=NamedType ('=' defaultValue=Value)? directives+=Directive* (',')?;`

[Other validations for reference](https://github.com/graph-quilt/graphql-xtext/tree/master/com.intuit.graphql.parent/com.intuit.graphql/src/com/intuit/graphql/validation)

Add to an existing validation class or link a new validation [here](https://github.com/graph-quilt/graphql-xtext/blob/82f5b5adffea5df64b4e953ae2c63a83bdbf66c6/com.intuit.graphql.parent/com.intuit.graphql/src/com/intuit/graphql/validation/GraphQLValidator.java#L14)

[similar validation in graphql-java](https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/schema/validation/DefaultValuesAreValid.java)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.