Skip to content

Commit

Permalink
Added test for interface problem reported in smallrye#281 comments an…
Browse files Browse the repository at this point in the history
…d patched

in previous commit
  • Loading branch information
velias committed Nov 9, 2020
1 parent c250837 commit f9b804e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ private void putIfAbsent(String key, Reference reference, ReferenceType referenc
String newClass = reference.getClassName();
if (!existingClass.equals(newClass)) {
throw new SchemaBuilderException(
"Classes " + existingClass + " and " + newClass + " map to the same GraphQL type '" + key + "', " +
"consider using the @Name annotation or a different naming strategy to distinguish between them");
"Classes " + existingClass + " and " + newClass + " map to the same GraphQL type '" + key + "', "
+ "consider using the @Name annotation or a different naming strategy to distinguish between them");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.smallrye.graphql.schema.test_generics;

import java.util.List;

public class ClassFromInterfaceWithOneGenericsListParam implements InterfaceWithOneGenericsListParam<ClassWithoutGenerics> {

@Override
public List<ClassWithoutGenerics> getInstance() {
return null;
}

@Override
public String getName() {
return "name";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ public ClassWithOneGenericsParamFromInterface<Long>[] getArrayOfClassWithOneGene
return null;
}

//error #??? reproducer
@Query
public ClassFromInterfaceWithOneGenericsListParam getClassFromInterfaceWithOneGenericsListParam() {
return null;
}

@Mutation
public InterfaceWithOneGenericsParam<String> setClassWithOneGenericsParamInControllerStringReturnInterface(
ClassWithOneGenericsParam<String> param1) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.smallrye.graphql.schema.test_generics;

import java.util.List;

public interface InterfaceWithOneGenericsListParam<T> {

List<T> getInstance();

String getName();

}

0 comments on commit f9b804e

Please sign in to comment.