Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public relationships to feed_streams #731

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading