title: Handling POST error with Graphql mutations
body: <p>I'm using Graphql and I want to use the idiomatic way of handing bad input from the client side with Graphql mutations. Currently if a user tries to submit data that doesn't meet the server requirements my server will still send back a 200 response.</p>
  
  <h3>SCHEMA</h3>
  
  <pre><code>mutation do
    field :create_team, :team do
      arg(:name, non_null(:string))
      arg(:league_id, non_null(:id))
  
      resolve(&amp;TeamResolver.create_team/3)
    end 
   end
  </code></pre>
  
  <h3>RESOLVER</h3>
  
  <pre><code>def create_team(_root, args, info) do
    Teams.create_team(args, info)
  end
  </code></pre>
  
  <h3>TEAMS CONTEXT</h3>
  
  <pre><code>def create_team(attrs, info) do
    user_id = Auth.current_user_id(info)
    changeset = Team.changeset(%Team{user_id: user_id}, attrs)
  
    case Repo.insert(changeset) do
      {:ok, team} -&gt;
        {:ok, team}
  
      {:error, changeset} -&gt;
        {:error, "error"}
    end
  end
  </code></pre>
  
  <p>The problem is in the context, we don't use the <code>conn</code> so I can't <code>put_status(:unproccesable_entity)</code> or something like that. If the client side sends bad data how do I send back a <code>4xx</code> status code?</p>