Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Commit

Permalink
sanity check for query
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissm79 committed Apr 22, 2016
1 parent f27fc2f commit 5c528d7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Traits/RelayMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ trait RelayMiddleware
*/
public function setupQuery(Request $request)
{
$relay = app('relay');
$relay->setupRequest($request->get('query'));
if ($query = $request->get('query')) {
$relay = app('relay');
$relay->setupRequest($query);

foreach ($relay->middleware() as $middleware) {
$this->middleware($middleware);
foreach ($relay->middleware() as $middleware) {
$this->middleware($middleware);
}
}
}

Expand Down

0 comments on commit 5c528d7

Please sign in to comment.