Support for specifying Node ID relations as condition inputs#8
Support for specifying Node ID relations as condition inputs#8marshall007 wants to merge 9 commits intographile:masterfrom
condition inputs#8Conversation
src/index.ts
Outdated
|
|
||
| for (const identifier of fk.fromNodeId(nodeId)) { | ||
| queryBuilder.where( | ||
| sql.fragment`${alias}.${sql.identifier(identifier.columnName)} = ${sql.value(identifier.value)}` |
There was a problem hiding this comment.
I'm not sure if this should use sql.value or gql2pg
|
@benjie I've added tests, please review again when you have a chance. I think I'm gonna leave any further refactoring (splitting into multiple plugins) for a later time. We have a need for these changes in our current project so I'd just like to get it merged ASAP. |
|
@benjie I have opened up a separate PR to this branch which converts the new Need help understanding why the updated test is failing on that branch with |
|
Fixed the failing test and merged that PR. Just need to make sure array NodeID |
condition inputscondition inputs
| createdAt: Datetime | ||
|
|
||
| \\"\\"\\"The globally unique \`ID\` to be used in selecting a single \`Person\`.\\"\\"\\" | ||
| personByPersonOrganizationIdAndPersonIdentifier: [ID!] |
There was a problem hiding this comment.
I'm still not comfortable with this naming for an array field, I'd prefer something like personByPersonOrganizationIdAndPersonIdentifierIsOneOf or In or IsIn or ContainedIn.
Incidentally the description doesn't match (missing plural).
TODO
Future Work
nullcase on NodeIDconditionsconditions