alphasights / ember-graphql-adapter

GraphQL adapter for Ember Data
MIT License
244 stars 26 forks source link

Use fromQuery method to build argumentset for objects #182

Closed michaelrabie closed 6 years ago

michaelrabie commented 6 years ago
else if (typeOf(value) === 'object') {
      value = this.argumentObjectOpeningToken + this.generateArgumentSet(value) + this.argumentObjectClosingToken;
    }

When value is an object that is being passing into generateArgumentSet, the following error occurs because the method is trying to call toArray() on the object: set.toArray is not a function when it's really just expecting it to be a type ArgumentSet or SelectionSet.

What generateArgumentList is actually expecting is an argumentSet

Paired with: @delkopiso