File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
spring-graphql/src/main/java/org/springframework/graphql/data/pagination Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 4747import org .apache .commons .logging .LogFactory ;
4848import reactor .core .publisher .Mono ;
4949
50+ import org .springframework .graphql .execution .TypeVisitorHelper ;
5051import org .springframework .lang .Nullable ;
5152import org .springframework .util .Assert ;
5253
@@ -79,11 +80,13 @@ private ConnectionFieldTypeVisitor(ConnectionAdapter adapter) {
7980 public TraversalControl visitGraphQLFieldDefinition (
8081 GraphQLFieldDefinition fieldDefinition , TraverserContext <GraphQLSchemaElement > context ) {
8182
83+ TypeVisitorHelper visitorHelper = context .getVarFromParents (TypeVisitorHelper .class );
8284 GraphQLCodeRegistry .Builder codeRegistry = context .getVarFromParents (GraphQLCodeRegistry .Builder .class );
85+
8386 GraphQLFieldsContainer parent = (GraphQLFieldsContainer ) context .getParentNode ();
8487 DataFetcher <?> dataFetcher = codeRegistry .getDataFetcher (parent , fieldDefinition );
8588
86- if (parent . getName (). equalsIgnoreCase ( "mutation" ) || parent . getName (). equalsIgnoreCase ( "subscription" )) {
89+ if (visitorHelper != null && visitorHelper . isSubscriptionType ( parent )) {
8790 return TraversalControl .ABORT ;
8891 }
8992
You can’t perform that action at this time.
0 commit comments