-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for specifying Node ID relations as condition
inputs
#8
base: master
Are you sure you want to change the base?
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -307,6 +307,9 @@ input ItemCondition { | |||
|
|||
\\"\\"\\"Checks for equality with the object’s \`createdAt\` field.\\"\\"\\" | |||
createdAt: Datetime | |||
|
|||
\\"\\"\\"The globally unique \`ID\` to be used in selecting a single \`Person\`.\\"\\"\\" | |||
personByPersonOrganizationIdAndPersonIdentifier: [ID!] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
null
case on NodeIDcondition
scondition
s