-
Notifications
You must be signed in to change notification settings - Fork 182
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
Feature/upgrade phx graphql telemetry #401
Closed
johnshaughnessy
wants to merge
21
commits into
feature/graphql-dashboard
from
feature/upgrade-phx-graphql-telemetry
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b269d9b
Fix typo in comment
johnshaughnessy ada6276
specify preferred json codec
johnshaughnessy bdc1f8d
Add test cases for room query
johnshaughnessy 125769c
DRY up tests
johnshaughnessy 6883a09
Remove unused "variables" from tests
johnshaughnessy 1a5853f
DRY : add assign_creator function
johnshaughnessy b585a8c
Rename put_auth_header_for_email
johnshaughnessy 002f1e9
DRY: put_auth_header_for_account
johnshaughnessy 66d8c4a
DRY: graphql query
johnshaughnessy b7c55e5
Don't need to hit the iql api
johnshaughnessy 96d27c8
Test room creation. Add default creator assignment
johnshaughnessy 6b4c0b6
Specify json_codec
johnshaughnessy fec3753
Add room name to mutation result
johnshaughnessy 012d040
Test pagination
johnshaughnessy 0e3f85e
Fix warnings
johnshaughnessy 8f2611c
Formatting
johnshaughnessy 60cb655
Merge remote-tracking branch 'origin/feature/graphql-dashboard' into …
johnshaughnessy 9ecb4bc
Upgrade dependencies
johnshaughnessy 32cbd8f
Upgrade deps
johnshaughnessy 139207f
Enable request logger
johnshaughnessy f37d7ca
Add absinthe metrics
johnshaughnessy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
defmodule RetWeb.Middlewares.HandleChangesetErrors do | ||
@behaviour Absinthe.Middleware | ||
def call(resolution, _) do | ||
%{resolution | | ||
errors: Enum.flat_map(resolution.errors, &handle_error/1) | ||
} | ||
%{resolution | errors: Enum.flat_map(resolution.errors, &handle_error/1)} | ||
end | ||
|
||
defp handle_error(%Ecto.Changeset{} = changeset) do | ||
changeset | ||
|> Ecto.Changeset.traverse_errors(fn {err, _opts} -> err end) | ||
|> Enum.map(fn({k,v}) -> "#{k}: #{v}" end) | ||
|> Ecto.Changeset.traverse_errors(fn {err, _opts} -> err end) | ||
|> Enum.map(fn {k, v} -> "#{k}: #{v}" end) | ||
end | ||
|
||
defp handle_error(error), do: [error] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WARNING: If we upgrade cowboy to 2.8, then we need to make sure we are running erlang 22+
See phoenixframework/phoenix#3950
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we are running 22.0 in habitat deploys:
https://github.com/mozilla/hubs-ops/blob/master/plans/erlang/habitat/plan.sh#L3
Need to confirm this and check terraform / hmc