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 sangria-slowlog middleware to allow for GraphQL slow logging #229

Closed
wants to merge 1 commit into from

Conversation

cliu587
Copy link
Contributor

@cliu587 cliu587 commented Mar 23, 2018

cc @dguo-coursera, @yifan-coursera

Use https://github.com/sangria-graphql/sangria-slowlog as right now it's impossible to understand what's making my queries take a long time.

Any idea how to test this change with assembler locally?

@cliu587
Copy link
Contributor Author

cliu587 commented Mar 23, 2018

Also:

  1. I realize you have a similar change https://github.com/coursera/naptime/pull/222/files
  2. I can't seem to compile Naptime even on master using sbt. Getting
[error] /Users/cliu/base/coursera/naptime/naptime-graphql/src/main/scala/org/coursera/naptime/ari/graphql/controllers/GraphQLController.scala:177: missing parameter type for expanded function
[error] The argument types of an anonymous function must be fully known. (SLS 8.5)
[error] Expected type was: sangria.execution.Executor.ExceptionHandler
[error]   def exceptionHandler(logger: Logger): Executor.ExceptionHandler = {
[error]                                                                     ^
[error] /Users/cliu/base/coursera/naptime/naptime-graphql/src/main/scala/org/coursera/naptime/ari/graphql/types/NaptimeTypes.scala:33: wrong number of arguments for pattern sangria.ast.StringValue(value: String,block: Boolean,blockRawValue: Option[String],comments: Vector[sangria.ast.Comment],location: Option[sangria.ast.AstLocation])
[error] Error occurred in an application involving default arguments.
[error]       case StringValue(string, _, _) => stringToDataMapEither(string)
[error]                       ^
...

@cliu587
Copy link
Contributor Author

cliu587 commented Mar 23, 2018

Closing this because I accidently amended my commit locally. Will create a new PR soon.

@cliu587 cliu587 closed this Mar 23, 2018
@cliu587 cliu587 deleted the cliu_gql_log branch March 23, 2018 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant