Skip to content

Commit

Permalink
Add public relationships to feed_streams
Browse files Browse the repository at this point in the history
  • Loading branch information
skanderm committed Dec 3, 2024
1 parent f178339 commit ce975b7
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions server/lib/orcasite/radio/feed_stream.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,28 @@ defmodule Orcasite.Radio.FeedStream do
end

relationships do
belongs_to :feed, Orcasite.Radio.Feed
belongs_to :prev_feed_stream, Orcasite.Radio.FeedStream
belongs_to :next_feed_stream, Orcasite.Radio.FeedStream
belongs_to :feed, Orcasite.Radio.Feed do
public? true
end

belongs_to :prev_feed_stream, Orcasite.Radio.FeedStream do
public? true
end

belongs_to :next_feed_stream, Orcasite.Radio.FeedStream do
public? true
end

has_many :feed_segments, Orcasite.Radio.FeedSegment
has_many :bout_feed_streams, Orcasite.Radio.BoutFeedStream
has_many :feed_segments, Orcasite.Radio.FeedSegment do
public? true
end

has_many :bout_feed_streams, Orcasite.Radio.BoutFeedStream do
public? true
end

many_to_many :bouts, Orcasite.Radio.Bout do
public? true
through Orcasite.Radio.BoutFeedStream
end
end
Expand Down Expand Up @@ -413,6 +427,7 @@ defmodule Orcasite.Radio.FeedStream do

graphql do
type :feed_stream
attribute_types feed_id: :string, prev_feed_stream_id: :string, next_feed_stream_id: :string

queries do
list :feed_streams, :index
Expand Down

0 comments on commit ce975b7

Please sign in to comment.