@@ -36,8 +36,8 @@ public DirectiveCreator(DirectiveArgumentCreator directiveArgumentCreator, Commo
36
36
37
37
public GraphQLDirective getDirective (Class <?> annotatedClass ) {
38
38
GraphQLDirective .Builder builder = newDirective ()
39
- .name (commonPropertiesCreator .getName (annotatedClass ))
40
- .description (commonPropertiesCreator .getDescription (annotatedClass ));
39
+ .name (commonPropertiesCreator .getName (annotatedClass ))
40
+ .description (commonPropertiesCreator .getDescription (annotatedClass ));
41
41
Introspection .DirectiveLocation [] validLocations = getValidLocations (annotatedClass );
42
42
if (validLocations == null || validLocations .length == 0 ) {
43
43
throw new GraphQLAnnotationsException ("No valid locations defined on directive" , null );
@@ -49,17 +49,16 @@ public GraphQLDirective getDirective(Class<?> annotatedClass) {
49
49
}
50
50
51
51
private void buildArguments (GraphQLDirective .Builder builder , Class <?> annotatedClass ) {
52
- Arrays .stream (annotatedClass .getDeclaredFields ()).forEach (x ->
53
- builder .argument (directiveArgumentCreator .getArgument (x , annotatedClass )));
52
+ Arrays .stream (annotatedClass .getDeclaredFields ())
53
+ .filter (field -> !field .isSynthetic ())
54
+ .forEach (field -> builder .argument (directiveArgumentCreator .getArgument (field , annotatedClass )));
54
55
}
55
56
56
-
57
57
private Introspection .DirectiveLocation [] getValidLocations (Class <?> annotatedClass ) {
58
58
DirectiveLocations directiveLocationsAnnotation = annotatedClass .getAnnotation (DirectiveLocations .class );
59
59
if (directiveLocationsAnnotation != null ) {
60
60
return directiveLocationsAnnotation .value ();
61
61
}
62
62
return null ;
63
63
}
64
-
65
64
}
0 commit comments