Sha256: e69d05b6299834803f52ddc59ce23161a9292d1942d9189e662257fdd7fc9b7d
Contents?: true
Size: 711 Bytes
Versions: 19
Compression:
Stored size: 711 Bytes
Contents
# frozen_string_literal: true require "spec_helper" require "generators/graphql/mutation_generator" class GraphQLGeneratorsMutationGeneratorTest < BaseGeneratorTest tests Graphql::Generators::MutationGenerator test "it generates an empty resolver by name" do run_generator(["UpdateName"]) expected_content = <<-RUBY Mutations::UpdateName = GraphQL::Relay::Mutation.define do name "UpdateName" # TODO: define return fields # return_field :post, Types::PostType # TODO: define arguments # input_field :name, !types.String resolve ->(obj, args, ctx) { # TODO: define resolve function } end RUBY assert_file "app/graphql/mutations/update_name.rb", expected_content end end
Version data entries
19 entries across 19 versions & 1 rubygems