graphiti-api / graphiti

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

Make attribute filterable when .filter called #382

Closed richmolj closed 2 years ago

richmolj commented 2 years ago

Previously if you did

attribute :foo, :string, filterable: false
filter :foo do
  # ...
end

It would raise an error that you're trying to make something explicitly marked unfilterable filterable.

Instead, let's just update the attribute to be filterable. Not only does this make logical sense, it allows us to do library dev things (like generate an unfilterable attribute under-the-hood while allowing user overrides).