diff --git a/modules/jooby-graphql/src/main/java/io/jooby/internal/graphql/GraphQLHandler.java b/modules/jooby-graphql/src/main/java/io/jooby/internal/graphql/GraphQLHandler.java index 0be68018e4..0d9335f59a 100644 --- a/modules/jooby-graphql/src/main/java/io/jooby/internal/graphql/GraphQLHandler.java +++ b/modules/jooby-graphql/src/main/java/io/jooby/internal/graphql/GraphQLHandler.java @@ -44,7 +44,7 @@ protected final ExecutionInput newExecutionInput(@NonNull Context ctx) { ctx.query("variables") .toOptional() .filter(string -> !string.equals("{}")) - .map(str -> json.fromJson(str, Map.class)) + .map(str -> json.>fromJson(str, Map.class)) .orElseGet(Collections::emptyMap); request.setOperationName(operationName); request.setQuery(query); @@ -52,7 +52,7 @@ protected final ExecutionInput newExecutionInput(@NonNull Context ctx) { } return ExecutionInput.newExecutionInput(request.getQuery()) .operationName(request.getOperationName()) - .context(ctx) + .graphQLContext(Map.of(Context.class, ctx)) .variables(request.getVariables()) .build(); }