Sha256: 1b2820d399c8cf4a87200afd59ad9c0b3920722067eb100cf81dc832669aa23f

Contents?: true

Size: 388 Bytes

Versions: 9

Compression:

Stored size: 388 Bytes

Contents

class Functions::<%= name %> < GraphQL::Function
  # Define `initialize` to store field-level options, eg
  #
  #     field :myField, function: Functions::<%= name %>.new(type: MyType)
  #
  # attr_reader :type
  # def initialize(type:)
  #   @type = type
  # end

  # add arguments by type:
  # argument :id, !GraphQL::ID_TYPE

  # Resolve function:
  def call(obj, args, ctx)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
graphql-1.5.7.1 lib/generators/graphql/templates/function.erb
graphql-1.5.10 lib/generators/graphql/templates/function.erb
graphql-1.5.9 lib/generators/graphql/templates/function.erb
graphql-1.5.8 lib/generators/graphql/templates/function.erb
graphql-1.5.7 lib/generators/graphql/templates/function.erb
graphql-1.5.6 lib/generators/graphql/templates/function.erb
graphql-1.5.5 lib/generators/graphql/templates/function.erb
graphql-1.5.4 lib/generators/graphql/templates/function.erb
graphql-1.5.3 lib/generators/graphql/templates/function.erb