goldcaddy77 / warthog

GraphQL API Framework with strong conventions and auto-generated schema
https://warthog.dev/
MIT License
359 stars 38 forks source link

Allow granular specification of filters by column #394

Closed goldcaddy77 closed 4 years ago

goldcaddy77 commented 4 years ago

Currently, you can specify whether or not a column is filterable:

export class User extends BaseModel {
  @StringField({ filter: false, nullable: true })
  noFilterField?: string;
}

But this will give you access to all of the filters for that data type (which is often too many). Allow filter to specify the operators we want to support:

export class User extends BaseModel {
  @StringField({ filter: ['eq', 'contains'], nullable: true })
  specificFiltersField?: string;
}
goldcaddy77 commented 4 years ago

Handled in https://github.com/goldcaddy77/warthog/pull/395