This repository was archived by the owner on Feb 10, 2019. It is now read-only.
This repository was archived by the owner on Feb 10, 2019. It is now read-only.
Detect impossible to resolve validation rules #336
Open
Description
I found that validating for circular references within Input Objects is an ongoing issue within the specification project: graphql/graphql-spec#189
input Something {
name: String
somethingElse: Something!
}
I suppose we could take it for granted that illegal Input Object definitions will eventually be caught by the schema validation. Lee Byron already stated that he deems it necessary, the question here is just when that will happen.
However, i think we have to consider this from the perspective of laravel as well, since we have an additional layer of validation on top. The following example would be an Input Object definition with Laravel-based validation that cannot possibly work:
class ExampleValidationInputObject extends BaseType
{
protected $inputObject = true;
public function fields()
{
return [
'self' => [
'name' => 'self',
'type' => GraphQL::type('ExampleValidationInputObject'),
'rules' => ['required']
],
];
}
}
Metadata
Metadata
Assignees
Labels
No labels