You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use directives on INPUT_FIELD_DEFINITIONS to automatically set values for inputs that are omitted (e.g. if we have a @default directive with a value, the user could omit this field and we can set it for them). In more complex scenarios (e.g., interfacing with neo4j) I would want to use @relationship directives to be able to infer if I should be creating edges between nodes based on what is passed on the input. However, it seems that directives on INPUT_FIELD_DEFINITIONS only fire if the respective field is already part of the input, and even if it is, I am not sure if the best way to modify values of the input is within the directive handler. All examples currently show simple checks of things like auth etc before the request goes through, and less so demonstrate modifications on the inputs or meta actions. Any feedback on the above would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use directives on
INPUT_FIELD_DEFINITIONS
to automatically set values for inputs that are omitted (e.g. if we have a@default
directive with a value, the user could omit this field and we can set it for them). In more complex scenarios (e.g., interfacing with neo4j) I would want to use @relationship directives to be able to infer if I should be creating edges between nodes based on what is passed on the input. However, it seems that directives onINPUT_FIELD_DEFINITIONS
only fire if the respective field is already part of the input, and even if it is, I am not sure if the best way to modify values of the input is within the directive handler. All examples currently show simple checks of things like auth etc before the request goes through, and less so demonstrate modifications on the inputs or meta actions. Any feedback on the above would be greatly appreciated!Beta Was this translation helpful? Give feedback.
All reactions