Special attribute not appearing in AshJsonApi

Hi!

I have the following attributes defined in a resource

attributes do
    uuid_primary_key :id

    attribute :component, :string do
      allow_nil? false
    end

    attribute :uid_hash, :string

    create_timestamp :created_at
  end

Note the created_at special attribute.

I am unable to select, filter or sort by created_at.

Any solutions/workaround?

Best regards
Terry

create_timestamp sets a couple of default options on the attribute, one of them is private? true DSL: Ash.Resource.Dsl — ash v2.21.2

To make the attribute visible just set the option yourself

create_timestamp :created_at, private?: false

1 Like