<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="359328" data-post-id="359328">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="melissaloh" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/melissaloh/120/37647_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  melissaloh
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just thought we’d mention that Rebecca Le will be presenting at the upcoming Elixir Sydney online meetup tomorrow about writing the book and there’s a special offer to attendees.</p>
<p><a href="https://lu.ma/9ynb9fc0" rel="noopener nofollow ugc">https://lu.ma/9ynb9fc0</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359328" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-359328" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359328"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="359345" data-post-id="359345">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sevenseacat" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sevenseacat/120/23153_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sevenseacat
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Ash Framework</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>yes, yes I will! Everyone is welcome <img src="https://forum.elixirforum.com/images/emoji/apple/hugs.png?v=15" title=":hugs:" class="emoji" alt=":hugs:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359345" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-359345" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359345"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="359443" data-post-id="359443">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sodapopcan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/120/34668_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sodapopcan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Sorry to hear you’re going through heck, <a class="mention" href="/u/stevensonmt" rel="nofollow">@stevensonmt</a>, hoping things ease up soon.</p>
<p>I finally bought this book today and went through chapter 1.  I had already started developing an app in Ash and was already familiar with most of the concepts but it really helped solidify them as it’s explained a little better than in the docs.  Or at least, in a better linear way than the docs.  For instance, it really hit home how the <code>:get_by</code> option in code interfaces works.  From the docs I understood that <code>:read</code> always works on collections.  Adding the <code>:get_by</code> option seemed almost arbitrary and I was struggling to figure out the reasoning as to why this API was chosen. It was the book that described it as a filter which makes a ton of sense.  I’m not sure the docs actually describe it this way but I’ll open a PR to add it if I can’t find it.</p>
<p>Another thing of note is that I love love <em>love</em> the <code>AshPhoenix.Form</code> API (well, except where you do <code>to_form(form)</code>… that is a little weird <img src="https://forum.elixirforum.com/images/emoji/apple/upside_down_face.png?v=15" title=":upside_down_face:" class="emoji" alt=":upside_down_face:" loading="lazy" width="20" height="20">).  It’s of course following “describe your domain, derive the rest” but I specifically like how it even calls effectful functions for us with <code>AshPhoenix.Form.submit</code>.</p>
<p>One thing I don’t <em>love</em> is <code>AshPhoenix.Extension</code>, ie, <code>form_to_</code>.  What I would prefer—and I feel like this was probably considered and abandon—is if <code>AshPhoenix.Form.for_create</code> and friends could also take a Domain + function combo as opposed to just Resource + action.  I feel like this would make it more consistent with how forms are otherwise used and that <code>for_create(Tunez.Music, :create_artist)</code> is less confusing than a <code>form_to_</code> prefixed function seemingly coming out of nowhere.  But <code>form_to_</code> isn’t terrible as it’s something you use <em>so</em> often that it would be hard to forget what it means.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359443" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-359443" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359443"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="359464" data-post-id="359464">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="FlyingNoodle" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/FlyingNoodle/120/32593_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  FlyingNoodle
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Domains also generate <code>can_&lt;insert_action_name_here&gt;?</code> functions on the domain, so it’s not that strange.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359464" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-359464" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359464"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="359506" data-post-id="359506">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sodapopcan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/120/34668_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sodapopcan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I didn’t say it was strange, just not as clear as the resource version.  I feel roughly the same about the <code>can_</code> ones.  But again, it’s <em>by no means</em> terrible and easy to get used to.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359506" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-359506" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359506"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="359508" data-post-id="359508">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Ultimately what we’ve found in practice with really large applications is that it can become really hard to track down action invocations when they use the format <code>SomeMod.some_fun(Resource,  :action)</code>. Refactorability is pretty high on the priority list, so <code>form_to_</code> was added to make sure that you could always track down where something was being used, including in forms. If you were to remove or rename the action and code interface, you’d get a compile warning for using an unknown function, whereas you’d have to hunt down atoms using <code>AshPhoenix.Form.for_create(...)</code>. Doesn’t change the fact that it can feel kind of strange to do it <img src="https://forum.elixirforum.com/images/emoji/apple/laughing.png?v=15" title=":laughing:" class="emoji" alt=":laughing:" loading="lazy" width="20" height="20"> but that is the original rationale for the addition.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359508" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-359508" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359508"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="359511" data-post-id="359511">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sodapopcan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/120/34668_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sodapopcan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh ya ok I see, that’s a very good reason, then!  Again, I don’t really mind it… I dunno, I guess <a class="mention" href="/u/flyingnoodle" rel="nofollow">@FlyingNoodle</a> was right, I <em>am</em> saying I found it strange <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20">  It’s definitely strange having the domain layer send you a form struct <em>but</em> it all makes sense with how Ash is designed and just takes some (slight) getting used to.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="359511" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-359511" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="359511"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="360389" data-post-id="360389">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ghannam80" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ghannam80/120/35232_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ghannam80
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/sevenseacat" rel="nofollow">@sevenseacat</a> ,<br>
Thanks for the book and finally getting to connecting the dots together when it comes to Ash framework.<br>
I had a question with regards to API , if we would like to get a response in a format like :<br>
{<br>
“name”: “Testing Tunez”,<br>
“artist”: “John”,<br>
“born”: 1980,<br>
“albums_count”: 5<br>
}<br>
is this possible with Ash JSON?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="360389" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-360389" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="360389"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="360390" data-post-id="360390">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>AshJsonApi’s primary goal is to create a <code>JSON:API</code> compatible API. The spec is documented here: <a href="https://jsonapi.org" rel="noopener nofollow ugc">https://jsonapi.org</a></p>
<p>When you meet that spec, you get a lot of benefits <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>However, if you must make something that doesn’t match that spec, you can use generic actions:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">action :your_action, :struct do
  # it returns a struct which is an record of this resource
  constraints instance_of: __MODULE__
  argument :id, :uuid, allow_nil?: false
  run fn input, _ -&gt; 
    Ash.get(__MODULE__, input.arguments.id)
  end
end
</code></pre>
<p>Then you could put that in your API with <code>route/3</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">route :get, "custom/route/:id", :your_action

</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="360390" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-360390" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="360390"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="360546" data-post-id="360546">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ghannam80" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ghannam80/120/35232_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ghannam80
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Ash-Core-Team" data-username="zachdaniel" data-post="20" data-topic="69575">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/48/31980_2.png" class="avatar"> zachdaniel:</div>
<blockquote>
<pre data-code-wrap="elixir"><code class="lang-elixir">route :get, "custom/route/:id", :your_action
</code></pre>
</blockquote>
</aside>
<p>Thanks , it worked without any issue.<br>
As for the standard , I am not sure what is the reason but in our domain “payments” most API written are returning such non standard output.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="360546" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-book-club/69575/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-360546" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="360546"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/69575/load_more?page=3">Load more posts (13 remaining)</a>
</div></template></turbo-stream>