-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a fix which enables having Generics in response type (fields), …
…added test
- Loading branch information
Showing
7 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
common/schema-builder/src/test/java/io/smallrye/graphql/index/generic/Greet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.smallrye.graphql.index.generic; | ||
|
||
public class Greet implements ResponseAttribute<String> { | ||
String value; | ||
|
||
public Greet(String name) { | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String getValue() { | ||
return "hello".concat(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
common/schema-builder/src/test/java/io/smallrye/graphql/index/generic/ResponseAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.smallrye.graphql.index.generic; | ||
|
||
public interface ResponseAttribute<T> { | ||
public T getValue(); | ||
} |
17 changes: 17 additions & 0 deletions
17
common/schema-builder/src/test/java/io/smallrye/graphql/index/generic/ResponseComposite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.smallrye.graphql.index.generic; | ||
|
||
public class ResponseComposite { | ||
Greet greet; | ||
|
||
public ResponseComposite(Greet greet) { | ||
this.greet = greet; | ||
} | ||
|
||
public Greet getGreet() { | ||
return this.greet; | ||
} | ||
|
||
public void setGreet(Greet greet) { | ||
this.greet = greet; | ||
} | ||
} |