| 1234567891011121314151617 |
- # frozen_string_literal: true
- module Resolvers
- class PokemonResolver < BaseResolver
- description 'Fetches one or more pokemon'
- argument_with_plural :id, GraphQL::STRING_TYPE, required: false
- argument_with_plural :iid, GraphQL::ID_TYPE, required: false
- argument_with_plural :pokedex_number, GraphQL::INT_TYPE, required: false
- argument_with_plural :nickname, GraphQL::STRING_TYPE, required: false
- def resolve(**args)
- prepare_args!(args)
- Pokemon.where(args)
- end
- end
- end
|