Setting Array Variables #16
-
Hi - sorry for the repeat questions! I have one more for you. I am using a number of variables in my query have applied the appropriate variables and arguments using the withArgument and withVariable methods. For the withVariable method, I did provide default values. I then called the withVariable method on the GraphQLRequest object with the specific values. I find this works fine for String, Int, Double, ....however if I try to do so with a string array, it does not seem to work. As an example, here are the query parameters I am using:
Query looks like this, notice the ref and status variables are String arrays:
This is the client call where I add the variables to the request:
Do you have any thoughts as to what I may be doing wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can disregard, I figured out what the problem was. There was no need to build the string as a JSON array...instead I just added the String [] instead and it started working. I assume the work to build out the array variables in JSON format is being done in your code. Thanks again! |
Beta Was this translation helpful? Give feedback.
You can disregard, I figured out what the problem was. There was no need to build the string as a JSON array...instead I just added the String [] instead and it started working. I assume the work to build out the array variables in JSON format is being done in your code. Thanks again!