Closed hanahsa closed 3 months ago
This is where the error is thrown:
I think if you made this change it would be fine?
return comments.get({
post_id: $parentStep.get('id'),
- user_id: fieldArgs.get('user_id'),
+ user_id: fieldArgs.getRaw('user_id'),
});
I think the issue is that the optimize method is not being suitably discerning about the identifierMatches
- if they're incompatible with the optimize approach then we shouldn't even try and inline. I think the check itself is also misguided, clearly I was solving a "just make it work in these two situation and throw an error if it's outside those" style of problem at the time, but now's the time to think about it more carefully and handle those edge cases (mostly; I think we should be checking: is the parent step allowed to depend on the given steps - if so, then it should be fine to inline, if not then we definitely shouldn't).
I was unable to reproduce this; please can you create a minimal reproduction against benjie/ouch-my-finger
and link to it here.
created https://github.com/benjie/ouch-my-finger/pull/15. As commented there though, not sure if its 100% minimal
Thanks!
Issue reproduced; the SQL file didn't need the CREATE UNIQUE INDEX
lines (and in fact, running it with them didn't work because they caused duplicates versus the PK indexes that already existed), but that wasn't much bother to remove. Thanks :raised_hands:
Summary
Passing FieldArg as one of the parameters of
resouce.get({})
results in an error.Steps to reproduce
Expected results
The comment to be returned.
Actual results
Additional context
I could work around this by instead doing
but this feels clunky.
In grafast-vbeta.6 and postgraphile-vbeta.21 I had this workaround working
but this is resulting in the same error in the latest versions.
Possible Solution