dab error with stored procedure parameter and graphql #2608
-
Hello all. I hope this is the correct place to ask questions like this. I am trying to set up a graphql endpoint that will execute a stored procedure with parameters. I'm stuck at the following error: To me, that appears as if dab is trying to convert the word "number" to an int. Unsure of why that would be the case. Just for grins, I tried changing the word "number" in the config file to just "n" and the error message then showed "n" in the two places it shows "number" now. Here is the applicable portion of my dab-config.json: As you can see, I've defined my parameter id as a number type, which I believe is correct as specified in this documentation. The rest call to this procedure works fine and returns the expected result (http://localhost:5000/api/proc_books_get_by_id?id=1016). It's only the graphql that is not working. Am I doing something wrong here? EDIT: forgot to mention, I'm not even getting far enough to call the stored procedure in graphql, this error is simply the result of Postman trying to read the schema from http://localhost:5000/graphql. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hello @camaro322hp your error is not related to the way you defined the parameter id as a number type. Would you be able to provide the complete error message that you are getting so that we can help you further? |
Beta Was this translation helpful? Give feedback.
-
Hi, @RubenCerna2079. Thanks for your assistance. Below is the full error message:
If it helps, here is my complete dab-config.json:
|
Beta Was this translation helpful? Give feedback.
-
Hi @camaro322hp, I was able to replicate the issue.
|
Beta Was this translation helpful? Give feedback.
Hi @camaro322hp, I was able to replicate the issue.
The problem is that you need to need to write a specific number inside of the parameter not "number".
An example of this (if it doesn't help, let me know):