graphiti-api / graphiti

Stylish Graph APIs
https://www.graphiti.dev/
MIT License
974 stars 139 forks source link

'string_enum' is not allowing 'not_eq' operator #402

Open aravindaytha12 opened 2 years ago

aravindaytha12 commented 2 years ago

Hi * need a small suggestion,

- Reference:

  https://github.com/graphiti-api/graphiti/blob/master/lib/graphiti/filter_operators.rb#L8
  https://github.com/graphiti-api/graphiti/blob/master/lib/graphiti/adapters/abstract.rb#L27

- Example:

  MyResource.all({ filter: { status: { eq: 'done' } } }).data # 'eq' is allowed operator for 'string_enum'
  MyResource.all({ filter: { status: { not_eq: 'done' } } }).data # Throws us an error, Supported operators are [:eq]
richmolj commented 2 years ago
aravindaytha12 commented 2 years ago
  • I think this was an oversight
  • Let's add it!
  • Correct

Thanks for the reply, Can please look into this Pull_request, if this considerable https://github.com/graphiti-api/graphiti/pull/403

elDub commented 1 year ago

I just ran into this as well. Is the PR supplied sufficient for the managing team to merge in? It looked simple enough.