mickhansen / graphql-sequelize

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

SimplifyAST does not handle ListValue fields in objects #654

Closed corinv closed 4 years ago

corinv commented 5 years ago

I am currently using simplifyAST to extract some arguments, ahead of a field resolving to construct a dataloader.

For example for arguments where: { clientId: { in: [1,2] }}, in the result of simplifyAST, in will be undefined, due to simplifyObjectValue(objectValue) not having any handling for lists:

https://github.com/mickhansen/graphql-sequelize/blob/c553924d1f964e6252048dae813da36356be1fb7/src/simplifyAST.js#L32-L42

This results in the field value resolving as field.value.value which will be undefined on a ListValue field.

Is there any reason for this (such as lists not being valid in an object argument) or is this a bug?

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.