Sha256: cdcbe75146d2dfe9d50115bc3bab7c5ba56f000926fd3ddae7b8c09d496661db

Contents?: true

Size: 595 Bytes

Versions: 108

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true
require 'generators/graphql/type_generator'

module Graphql
  module Generators
    # Generate an interface type by name,
    # with the specified fields.
    #
    # ```
    # rails g graphql:interface NamedEntityType name:String!
    # ```
    class InterfaceGenerator < TypeGeneratorBase
      desc "Create a GraphQL::InterfaceType with the given name and fields"
      source_root File.expand_path('../templates', __FILE__)

      private

      def graphql_type
        "interface"
      end

      def fields
        custom_fields
      end
    end
  end
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
graphql-2.4.9 lib/generators/graphql/interface_generator.rb
graphql-2.4.8 lib/generators/graphql/interface_generator.rb
graphql-2.4.7 lib/generators/graphql/interface_generator.rb
graphql-2.4.6 lib/generators/graphql/interface_generator.rb
graphql-2.4.5 lib/generators/graphql/interface_generator.rb
graphql-2.4.4 lib/generators/graphql/interface_generator.rb
graphql-2.4.3 lib/generators/graphql/interface_generator.rb
graphql-2.4.2 lib/generators/graphql/interface_generator.rb
graphql-2.4.1 lib/generators/graphql/interface_generator.rb
graphql-2.4.0 lib/generators/graphql/interface_generator.rb
graphql-2.3.20 lib/generators/graphql/interface_generator.rb
graphql-2.3.19 lib/generators/graphql/interface_generator.rb
graphql-2.3.18 lib/generators/graphql/interface_generator.rb
graphql-2.3.17 lib/generators/graphql/interface_generator.rb
graphql-2.3.16 lib/generators/graphql/interface_generator.rb
graphql-2.3.15 lib/generators/graphql/interface_generator.rb
graphql-2.3.14 lib/generators/graphql/interface_generator.rb
graphql-2.3.13 lib/generators/graphql/interface_generator.rb
graphql-2.3.12 lib/generators/graphql/interface_generator.rb
graphql-2.3.11 lib/generators/graphql/interface_generator.rb