Sha256: cd05cff63e02da80834bc2f436f696c6882da12bba4d25f8f2c8df4ad81103e8

Contents?: true

Size: 777 Bytes

Versions: 4

Compression:

Stored size: 777 Bytes

Contents

# frozen_string_literal: true

module SolidusGraphqlApi
  module Types
    class Shipment < Base::RelayNode
      description 'Order Shipment.'

      field :created_at, GraphQL::Types::ISO8601DateTime, null: true
      field :number, String, null: false
      field :shipped_at, GraphQL::Types::ISO8601DateTime, null: true
      field :shipping_rates, ShippingRate.connection_type, null: false
      field :state, String, null: false
      field :tracking, String, null: true
      field :tracking_url, String, null: true
      field :manifest, [Types::ManifestItem], null: false
      field :updated_at, GraphQL::Types::ISO8601DateTime, null: true

      def shipping_rates
        Queries::Shipment::ShippingRatesQuery.new(shipment: object).call
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_graphql_api-0.3.1 lib/solidus_graphql_api/types/shipment.rb
solidus_graphql_api-0.3.0 lib/solidus_graphql_api/types/shipment.rb
solidus_graphql_api-0.2.0 lib/solidus_graphql_api/types/shipment.rb
solidus_graphql_api-0.1.0 lib/solidus_graphql_api/types/shipment.rb