Hello :wave: , I have a question regarding how que...
# pact-js
d
Hello đź‘‹ , I have a question regarding how queries are represented in generated contracts. On my interaction I have set up my query as a string but on the contract, my query appears as an array
"method": "GET",
"path": "/v1/assignments",
"query": {
"audienceId": [
"63f57d805d8ecbf46f5b5278"
]
}
Is this normal or can my query appear without being encased in an array?
t
You can ignore the contents in the contract, it’s essentially opaque
Is this normal or can my query appear without being encased in an array?
Your query is not encased in an array
In the contract file, it’s formatted that way
d
Thank you @Timothy Jones
m
It’s because query parameters can have multiple values, and there is no “standard” way to represent arrays. The pact file chooses to store it in a data structure that is already an array, presumably because it’s easier to parse