Sha256: 1913a732c22ee65290a6ed51ed94047b58f76791b5dc945dea1fbda7da8b0785

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

# Some test GraphQL objects for testing
NulogyMessageBusProducer.config.register_schema(
  schema: "NulogyMessageBusProducer::Specs::TestSchema",
  key: "test"
)

module NulogyMessageBusProducer
  module Specs
    class TestObject < GraphQL::Schema::Object
      graphql_name "testObject"

      field :id, type: NulogyGraphqlApi::Types::UUID, null: false
    end

    class TestQuery < GraphQL::Schema::Object
      graphql_name "testQuery"

      field :foo, TestObject, null: false do
        argument :id, type: NulogyGraphqlApi::Types::UUID, required: false
      end

      def foo(id:)
        OpenStruct.new(id: id)
      end
    end

    class TestCreated < NulogyMessageBusProducer::BasePublicSubscription
      field :description, String, null: false
    end

    class TestSubscription < GraphQL::Schema::Object
      field :test_created, subscription: TestCreated
    end

    class TestSchema < GraphQL::Schema
      use NulogyMessageBusProducer::PostgresPublicSubscriptions

      query TestQuery
      subscription TestSubscription
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nulogy_message_bus_producer-2.1.1 spec/support/test_graphql_schema.rb