Skip to content

Check for valid default value of arguments #154

@jdacoello

Description

@jdacoello

Given an schema like:

type MyType {
  someField(unit: MyUnitEnum="UNIT_X"): Int
  ...
}

enum MyUnitEnum {
  A
  B
  C
}

None of the tools is complaining when the schema is composed. The issue is that UNIT_X is actually not specified as an allowed value in MyUnitEnum. So the composition should not succeed, and the reason must be given like "UNIT_X is not specified in the enum MyUnitEnum "

This is also visible when using QUDT units. For example:

enum TemperatureUnit {
  DEG_C
  ...
}

But someone uses

type Person {
  temperature(unit: TemperatureUnit="DEGREE"): Int
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions