RStankov / SearchObjectGraphQL

GraphQL plugin for SearchObject gem
MIT License
159 stars 25 forks source link

Can't set argument as required #18

Closed vfonic closed 4 years ago

vfonic commented 4 years ago

I noticed that setting:

option(:from_date, type: Types::DateType, required: true)

has no effect.

I was wondering why the list of accepted keys is limited here: https://github.com/RStankov/SearchObjectGraphQL/blob/master/lib/search_object/plugin/graphql.rb#L29

The plugin also doesn't report any issues on non-matched keys, just ignores them silently. I think the best solution would be to accept all passed keys (options), or at least report of any wrongly passed / ignored ones.

vfonic commented 4 years ago

Closing this as proposed solution got accepted and merged. Thanks!