mickhansen / graphql-sequelize

GraphQL & Relay for MySQL & Postgres via Sequelize
MIT License
1.9k stars 172 forks source link

some bugs becasue Sequelize 4 symbol operators support. #635

Closed flybluewolf closed 4 years ago

flybluewolf commented 5 years ago

the function 'assign' of lodash don't copy the key which is symbol.

var obj = {[Symbol()]: 1}
_.assign({}, obj); // {}
Object.assign({}, obj) // Object {Symbol(): 1}

in /lib/relay.js file,

  let argsToWhere = function argsToWhere(args) {
    let result = {};

    if (where === undefined) return result;

    _lodash2.default.each(args, (value, key) => {
      if (ignoreArgs && key in ignoreArgs) return;
      _lodash2.default.assign(result, where(key, value, result));
    });

    return result;
  };

something missing like the where statement:

 { or: [{ reference: { like: "%abc%" } }] }
balexandre commented 5 years ago

https://github.com/lodash/lodash/issues/2088

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.