desirable-objects/grails-sendgrid 10
Sendgrid plugin for Grails
rpalcolea/codemash-2018-presentation 2
Presentation for my talk "Real Time Traffic Visualization in a Microservices World" @ CodeMash 2018
rpalcolea/dependency-management-at-scale-jconf-centroamerica-2020 1
Dependency Management at Scale - JConf Centro America 2020
gdeltorno/encuestaSistemaDental 0
Encuesta dental
Airbrake Client for Grails
Badge generator for Artifactory
rpalcolea/artifactory-client-java 0
Artifactory REST Client Java API bindings
rpalcolea's blog
push eventNetflix-Skunkworks/policyuniverse
commit sha a47239e61bfbe359c09afe28807bf3d6a2c25cbf
Updating PolicyUniverse SDFs
push time in 20 hours
issue openedNetflix/dgs-framework
bug: Generated client interfaces does not extend other interfaces
I have a schema like this:
interface Error {
message: String
}
interface SpecializedError implements Error {
messsage: String
specializedError: String
}
type ValidationError implements SpecializedError, Error {
message: String
specializedError: String
}
type TestPayload {
errors: [Error!]
result: ResultType
}
type ResultType {
success: Boolean!
}
Expected behavior
I want the generated interface SpecializedError to extend Error so that my TestPayload error field can contain both ValidationError and other error types that implement Error directly.
Actual behavior
Interfaces do not extend other interfaces. However, concrete classes implement multiple interfaces.
Steps to reproduce
Generate code from the schema above and view its output. This is using the Java codegen.
Let me know if I can assist with more information.
created time in a day
issue openedNetflix/dgs-framework
Generating client queries/mutations from nested types only creates top level type
Discussed in https://github.com/Netflix/dgs-framework/discussions/370
<div type='discussions-op-text'>
<sup>Originally posted by anderssandven May 28, 2021</sup> I have a schema like this:
type Mutation {
one: One
}
type One {
two(three: Three!): Two
}
type Two {
test: String
}
input Three {
test3: String
}
When doing code generation I expect to get multiple queries generated. The queries generated are:
OneGraphQLQuery.java
OneProjectionRoot.java
OneTwoProjection.java
I expect to get a OneTwoGraphlQuery aswell because I cannot supply any arguments through OneGraphqlQuery.
Am I misunderstanding how this works?</div>
created time in a day
issue commentNetflix/dgs-framework
When using the client API, I think it should get the same result in the GraphiQL UI. The serialization and deserialization are dependent on Jackson.
You can try to return a String type of the execution result, and use json path to read the result. The String type result should be a JSON String.
comment created time in a day
issue openedNetflix/dgs-framework
feature: Simplified Directive declaration
Followed the steps of the discussion posts, I tried to add a simple uppercase directive in mysample project, but it does not work as expected.
The uppercase directive wring class.
public class UppercaseDirectiveWiring implements SchemaDirectiveWiring {
@Override
public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> env) {
var field = env.getElement();
var parentType = env.getFieldsContainer();
var originalDataFetcher = env.getCodeRegistry().getDataFetcher(parentType, field);
var dataFetcher = DataFetcherFactories.wrapDataFetcher(originalDataFetcher,
(dataFetchingEnvironment, value) -> {
if (value instanceof String s) {
return s.toUpperCase();
}
return value;
}
);
env.getCodeRegistry().dataFetcher(parentType, field, dataFetcher);
return field;
}
}
And I created a bean @DgsRuntimeWiring in the data fetchers.
@DgsComponent
public class PostsDataFetcher {
@DgsRuntimeWiring
RuntimeWiring.Builder runtimeWiring(RuntimeWiring.Builder builder) {
return builder.directive("uppercase", new UppercaseDirectiveWiring());
}
When running the application, and test it on Graphiql, but it does not work. Not sure where is wrong.
This directive is working with my other Graphql example written in GraphQL Java and Spring Graphql.
Check: https://github.com/hantsy/spring-graphql-sample/tree/master/graphql-java/src/main/java/com/example/demo/gql/directives
Hope add a @DgsDirective and apply on the UppercaseDirectiveWiring to register a directive.
created time in a day
push eventopenrewrite/rewrite
commit sha 334198d5191afe5a0d13336c57e50671f4c0a297
UnnecessaryThrows doesn't remove Closeable/Autocloseable exceptions (fixes #631)
push time in a day
issue closedopenrewrite/rewrite
UnnecessaryThrows drops throws for exception thrown from AutoCloseable close().
Discovered while running UnecessaryThrows on GeoTools.
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
class Test {
public void testLookupWithExtendedClasspath() throws IOException{
URL url = getClass().getResource("foo.jar");
assertNotNull(url);
// URLClassLoader implements Closeable and throws IOException from its close() method
try (URLClassLoader cl = new URLClassLoader(new URL[] {url})) {
}
}
}
closed time in a day
pway99push eventopenrewrite/rewrite
commit sha 792620d2191bb972ed5f1bb169c40a4c13a67a90
Enable enhanced type validation now that #653 is fixed
push time in a day
push eventopenrewrite/rewrite
commit sha c00179cc8264eceb01b944e160e1d9a5589c93a6
BlockStatementTemplateGenerator doesn't duplicate inner classes (fixes #653)
push time in a day
issue closedopenrewrite/rewrite
I noticed this while looking into why CovariantEqualsTest.replaceWithNonCovariantEqualsWhenNested() was producing a method invocation missing type attributions.
That test turns this before:
class A {
class B {
int n;
public boolean equals(B bee) {
return n == bee.n;
}
}
}
into this after:
class A {
class B {
int n;
@Override
public boolean equals(Object obj) {
if (obj == this) return true;
if (obj == null || getClass() != obj.getClass()) return false;
B bee = (B) obj;
return n == bee.n;
}
}
}
getClass() and obj.getClass() come out un-type-attributed because the snippet being generated by BlockStatementTemplateGenerator is (reformatted for legibility):
class A {
class B {
public boolean equals(B bee) {
return true;
}
int n;
}
class B {
public boolean equals(B bee) {
return true;
}
int n;
public boolean equals(Object obj) {
if (true) {
/*__TEMPLATE__*/
if (obj == this) return true;
if (obj == null || getClass() != obj.getClass()) return false;
B bee = (B) obj;
}
return true;
}
}
}
Which has two competing definitions for inner class B.
closed time in a day
sambsnydissue commentNetflix/dgs-framework
feature: Integration with WebFlux ReactiveSecurityContextHolder
Okay, after messing around inside dgs-framework, I think I have a path forward but would love input from the maintainers.
I modified DataFetcherResultProcessor:
interface DataFetcherResultProcessor {
fun supportsType(originalResult: Any): Boolean
fun process(originalResult: Any, dfe: DataFetchingEnvironment): Any
}
this is a relatively trivial change, allowing access to the dfe (or potential we should allow access to DgsDataFetchingEnvironment instead) inside of Mono/FluxDataFetcherResultProcessors.
I then had to implement my own custom Mono/Flux implementation converters since spring-security is not included in these modules.
class MonoDataFetcherResultProcessor : DataFetcherResultProcessor {
override fun supportsType(originalResult: Any): Boolean {
return originalResult is Mono<*>
}
override fun process(originalResult: Any, dfe: DataFetchingEnvironment): Any {
if (originalResult is Mono<*>) {
val context = ReactiveSecurityContextHolder.withAuthentication((dfe.getContext<DgsContext>().customContext as SecurityContext).authentication)
return originalResult.contextWrite(context).toFuture()
} else {
throw IllegalArgumentException("Instance passed to ${this::class.qualifiedName} was not a Mono<*>. It was a ${originalResult::class.qualifiedName} instead")
}
}
}
noting that my customContext is:
@Component
class SecurityContextDgs : DgsReactiveCustomContextBuilderWithRequest<SecurityContext> {
override fun build(
extensions: Map<String, Any>?,
headers: HttpHeaders?,
serverRequest: ServerRequest?
): Mono<SecurityContext> {
return ReactiveSecurityContextHolder.getContext()
}
}
This could probably be improved in some way, but it does work e2e for me on my fork + custom implementations.
What are peoples thoughts and suggestions?
comment created time in a day
issue commentNetflix/dgs-framework
feature: Add a default Cors configuration
Add a CorsFilter is on conditional, as it was done in the graphql-java-kickstart spring boot starter.
comment created time in a day
push eventopenrewrite/rewrite
commit sha 7b717926d1e949d261d1397acc1fce89e19aaaac
Adjust RemoveUnusedImport test to show issue #687.
push time in a day
push eventNetflix/spectator-go
commit sha 276718605156595da704f7ca8f7af22465baab66
fix file descriptor metric names This commit fixes a bug that was introduced by the following commit: https://github.com/Netflix/spectator-go/commit/375b638ffabe980c39294486dc6e03a9993a2fb3 When the file descriptor metric names were updated from `fh.maxOpen` and `fh.curOpen` to `fh.allocated` and `fh.max`, the names were swapped. The `allocated` metric should track the number of file descriptors opened, and the `max` metric should track the number of file descriptors configured.
commit sha ec1510c7a7c9cbf52c7e8200bd670878bfde172e
Merge pull request #57 from copperlight/fh-metric-names fix file descriptor metric names
push time in a day
PR merged Netflix/spectator-go
This commit fixes a bug that was introduced by the following commit:
https://github.com/Netflix/spectator-go/commit/375b638ffabe980c39294486dc6e03a9993a2fb3
When the file descriptor metric names were updated from fh.maxOpen and
fh.curOpen to fh.allocated and fh.max, the names were swapped. The
allocated metric should track the number of file descriptors opened,
and the max metric should track the number of file descriptors
configured.
pr closed time in a day
PR opened Netflix/spectator-go
This commit fixes a bug that was introduced by the following commit:
https://github.com/Netflix/spectator-go/commit/375b638ffabe980c39294486dc6e03a9993a2fb3
When the file descriptor metric names were updated from fh.maxOpen and
fh.curOpen to fh.allocated and fh.max, the names were swapped. The
allocated metric should track the number of file descriptors opened,
and the max metric should track the number of file descriptors
configured.
pr created time in a day
issue commentopenrewrite/rewrite
MethodPattern("* build()") doesn't match anyhting
The test Jonathan provides passes currently. Since that works for you, Alex, I'm closing this issue.
comment created time in a day
issue closedopenrewrite/rewrite
MethodPattern("* build()") doesn't match anyhting
If my code has Response.status(200).build() the pattern isn't matched. However, if the pattern is "javax.ws.rs.core.Response.ResponseBuilder build()" it works.
Suspecting "*" for the type not making it in properly into regular expression, i.e. [^.]* is the regular expression for the type... ^ should be not inside [] ?
closed time in a day
BoykoAlexpush eventopenrewrite/rewrite
commit sha 38726d790e02c9b13b6b93d64796baf50f5c5589
Add test for MethodMatcher matching any reciever type. Closes #629
push time in a day
issue commentNetflix/dgs-framework
feature: Add a default Cors configuration
Because CORS is very specific to each application, and there are some dangers in not knowing it's enabled, I think we should not support this out of the box. @berngp WDYT?
comment created time in a day
push eventNetflix/dgs-framework
commit sha fb456dc21bace4c45283e17e52619c4d4194336f
Added serialization for fragments
commit sha 423d3359c1a87875354de9f72b0fa3fa04e1cb9e
Added serialization for fragments
commit sha c03aeb5d211527688c538eb7cc6e5c8cc0585d26
formatting
commit sha 56caed13eaae5ee5890ea655049fded4d6834a94
query formatting
commit sha c0c74c39956ff6511d2b98d16af56153a29147eb
Merge pull request #418 from Netflix/fragment-serializaton Added serialization for fragments
push time in a day
PR merged Netflix/dgs-framework
Fix to properply serialize input arguments for fragments as well.
pr closed time in a day
issue commentopenrewrite/rewrite
I was wondering: maybe there should be a warning or an error if multiple files matches the expression?
Otherwise some files will be lost.
E.g. your run the recipe with fileMatcher=*.txt and fileName=foo.csv and you have a directory containing a.txt, b.txt and c.txt : at end you'll have only one file in that directory.
comment created time in a day
issue openedopenrewrite/rewrite
Condition to unfold static Imports never triggers.
References to items in the static * may have been removed, but the import is never unfolded.
created time in a day
push eventNetflix/dgs-framework
commit sha 56caed13eaae5ee5890ea655049fded4d6834a94
query formatting
push time in a day
delete branch Netflix/titus-api-definitions
delete branch : TITUS-5368_networking_mode
delete time in a day