# frozen_string_literal: true module Mutations class UploadManyPokemon < Mutations::BaseMutation include ::ReturnsErrors field :pokemon, [Types::PokemonType], null: true argument :base64_encoded_pokemon_files, [GraphQL::STRING_TYPE], required: true def resolve(base64_encoded_pokemon_files:) # Pass in user and other contexts in the future service = CreatePokemonFromBase64Service.new service.execute(base64_encoded_pokemon_files) end end end