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
Why can't we look up the parameter type from stored procedure definition? By trying to parse into an int first, we are restricting the parameter to an int, even if it were actually a string.
What if the parameter type is actually a string but the default value given is a number? - The runtime value may not necessarily be a number but a different string, - the graphql schema that we generate here will not allow such a use case...
Why do we mandate default value for parameters to be specified in the config?
Why can't I only specify the name of the stored procedure in the config and have graphql use the default value specified in the stored proc definition to be used? Can't we infer default value of parameter from stored procedure definition?
Also test what happens if the stored procedure has parameters on the database but the config doesn't..
This was at least partially addressed in #1383. Instead of resolving the parameter value type of the runtime configuration supplied parameter value, the engine now checks the stored procedure's database metadata to ensure that the runtime config supplied value can be parsed into the value type defined in the database.
What is not addressed in 1383 is the automatic resolving of a default value from database metadata instead of requiring a default value be defined in runtime config.
With #1847 default value is no longer REQUIRED in runtime config, but we let the db provide the default when needed. We are unable to find the exact default value from stored proc definition, due to limitations described in #1847.
What if the parameter type is actually a string but the default value given is a number? - The runtime value may not necessarily be a number but a different string, - the graphql schema that we generate here will not allow such a use case...
E.g.
config:
runtime:
Why do we mandate default value for parameters to be specified in the config?
Why can't I only specify the name of the stored procedure in the config and have graphql use the default value specified in the stored proc definition to be used? Can't we infer default value of parameter from stored procedure definition?
Also test what happens if the stored procedure has parameters on the database but the config doesn't..
Originally posted by @Aniruddh25 in #979 (comment)
The text was updated successfully, but these errors were encountered: