Closed
Description
Hi! I'm the maintainer of the GraphQL for IntelliJ IDEA plugin. I have a question about validating field implementations when a default value is specified. I looked through the specification and found no explicit mention of checking default values in the field validation process.
Should I check default values at all? If so, I know three cases in which it is unclear to me whether the implementation of the interface is correct or should I display an error:
- Only an interface specifies a default value, but the implementor doesn't.
interface Interface {
field(a: String = "1"): String
}
type Query implements Interface {
field(a: String): String
}
- Ony an implementation specifies a default value:
interface Interface {
field(a: String): String
}
type Query implements Interface {
field(a: String = "1"): String
}
- Both specify default values but their values are different:
interface Interface {
field(a: String = "ABC"): String
}
type Query implements Interface {
field(a: String = "1"): String
}
Metadata
Metadata
Assignees
Labels
No labels