IBM / openapi-to-graphql

Translate APIs described by OpenAPI Specifications (OAS) into GraphQL

Home Page:https://developer.ibm.com/open/projects/openapi-to-graphql/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queries with array parameters doesn't work

Zn4rK opened this issue · comments

Describe the bug
Queries with query parameters that are array based doesn't work.

It boils down to this line:

if (param.style === 'form' && typeof args[saneParamName] === 'object') {

An array is also considered an object in JavaScript. The if statement needs to be flipped.

The queryString parts of that library should probably be handled by https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams as well.