Add failing test for directives with input cycles#3472
Add failing test for directives with input cycles#3472eapache wants to merge 1 commit intormosolgo:masterfrom
Conversation
It was noted in a comment in build_from_definition.rb that this might be a problem. It is a problem (this test currently fails with SystemStackError).
|
The comment in We've gotten away with it because cycles in directive arguments are presumably pretty rare. But the most obvious way to start validating default values means we need to coerce all arguments while building the schema (this is the "build-schema-from-definition issues" referred to in #3448), and cycles in regular field/mutation arguments are not nearly as rare. |
|
Would it help for me to propose a hack to fix this test? |
|
I gave it a shot anyways, here's a proposed hack: 9e4eea9 Feel free to grab it here if it helps (or if you'd rather, I can merge that branch instead of this one -- I just couldn't push that commit here). |
|
🤔 I think that just moves the problem; I could write an equally short test which passes on main but fails with that hack in place (make a schema with a directive argument pointing to a three-input-object-cycle, then try and use that directive with a fully-specified argument). |
|
Ah, sure, I added a failing test in that vein here: 7cafefb 😖 |
It was noted in a comment in build_from_definition.rb that this might be
a problem. It is a problem (this test currently fails with
SystemStackError).
@rmosolgo this is incomplete right now given it's just a test and no actual fix, but I ran into this as part of digging around in #3448.