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

Added test for interface problem reported in #281 comments and patched #512

Merged
merged 1 commit into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();

}