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

Align spec language in ValidateDefaultValue #72

Open
glen-84 opened this issue Dec 16, 2024 · 0 comments
Open

Align spec language in ValidateDefaultValue #72

glen-84 opened this issue Dec 16, 2024 · 0 comments

Comments

@glen-84
Copy link
Contributor

glen-84 commented Dec 16, 2024

ValidateDefaultValue(defaultValue):

  • If {defaultValue} is a ListValue:
    • For each {valueNode} in {defaultValue}:
      • If {ValidateDefaultValue(valueNode)} is false
        • return false
  • If {defaultValue} is an ObjectValue:
    • Let {objectFields} be a list of all fields of {defaultValue}
    • Let {fields} be a list of all fields {objectFields} are referring to
    • For each {field} in {fields}:
      • If {IsExposed(field)} is false
        • return false
    • For each {objectField} in {objectFields}:
      • Let {value} be the value of {objectField}
      • return {ValidateDefaultValue(value)}
  • If {defaultValue} is an EnumValue:
    • If {IsExposed(defaultValue)} is false
      • return false
  • return true

Align objectFields/fields language with https://spec.graphql.org/draft/#sec-Input-Object-Required-Fields.

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

No branches or pull requests

1 participant