Sha256: 2e561bcf6a40c5c2e75253d1c79bc6c6a03ae34f209b20885e104ec87740bdbc

Contents?: true

Size: 860 Bytes

Versions: 1

Compression:

Stored size: 860 Bytes

Contents

# frozen_string_literal: true

module Platform
  module Objects
    class X < Platform::Objects::Base
      model_name "X"
      description "An x on a y."
      visibility :internal
      minimum_accepted_scopes ["z"]

      global_id_field :id
      implements GraphQL::Relay::Node.interface

      field :f1, Objects::O1, "The x being y.", null: false
      field :f2, Enums::E1, "x for the y.", method: :field_2, null: false
      field :f3, Enums::E2, "x for y.", null: true
      field :details, String, "Details.", null: true

      field :f4, Objects::O2, "x as a y inside the z.", null: false

      def f4
        Class1.new(
          a: Class2.new(
            b: @object.b_1,
            c: @object.c_1
          ),
          d: Class3.new(
            b: @object.b_2,
            c: @object.c_3,
          )
        )
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graphql-1.8.0.pre3 spec/fixtures/upgrader/type_x.transformed.rb