This repository was archived by the owner on Dec 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-34
lines changed
graphql-spring-boot-autoconfigure/src
main/java/com/oembedler/moon/graphql/boot
test/java/com/oembedler/moon/graphql/boot/test/graphqlJavaTools Expand file tree Collapse file tree 3 files changed +14
-34
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import graphql .schema .idl .SchemaDirectiveWiring ;
4
4
5
- public interface SchemaDirective {
5
+ public class SchemaDirective {
6
6
7
- String getName ();
7
+ private final String name ;
8
+ private final SchemaDirectiveWiring directive ;
8
9
9
- SchemaDirectiveWiring getDirective ();
10
+ public SchemaDirective (String name , SchemaDirectiveWiring directive ) {
11
+ this .name = name ;
12
+ this .directive = directive ;
13
+ }
14
+
15
+ public String getName () {
16
+ return name ;
17
+ }
10
18
11
- static SchemaDirective create ( String name , SchemaDirectiveWiring directive ) {
12
- return new SchemaDirectiveImpl ( name , directive ) ;
19
+ public SchemaDirectiveWiring getDirective ( ) {
20
+ return directive ;
13
21
}
14
22
15
23
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
import graphql .schema .GraphQLObjectType ;
8
8
import graphql .schema .idl .SchemaDirectiveWiring ;
9
9
import graphql .schema .idl .SchemaDirectiveWiringEnvironment ;
10
- import graphql .schema .idl .SchemaParser ;
11
10
import org .junit .Test ;
12
11
import org .springframework .context .annotation .Bean ;
13
12
import org .springframework .context .annotation .Configuration ;
14
13
import org .springframework .stereotype .Component ;
15
14
16
- import static org .junit .Assert .assertNotNull ;
17
-
18
15
public class GraphQLToolsDirectiveTest extends AbstractAutoConfigurationTest {
19
16
20
17
public GraphQLToolsDirectiveTest () {
@@ -39,7 +36,7 @@ String schemaLocationTest(String id) {
39
36
40
37
@ Bean
41
38
public SchemaDirective uppercaseDirective () {
42
- return SchemaDirective . create ("uppercase" , new SchemaDirectiveWiring () {
39
+ return new SchemaDirective ("uppercase" , new SchemaDirectiveWiring () {
43
40
@ Override
44
41
public GraphQLObjectType onObject (SchemaDirectiveWiringEnvironment <GraphQLObjectType > environment ) {
45
42
return null ;
You can’t perform that action at this time.
0 commit comments