Skip to content

Commit 91b6552

Browse files
committed
Clear the container and the type registry after done
1 parent 46a0647 commit 91b6552

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/graphql/annotations/processor/GraphQLAnnotations.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ public String getTypeName(Class<?> objectClass) {
101101

102102
public static GraphQLObjectType object(Class<?> object) throws GraphQLAnnotationsException {
103103
GraphQLAnnotations instance = getInstance();
104-
return instance.graphQLObjectHandler.getObject(object, instance.getContainer());
104+
try {
105+
return instance.graphQLObjectHandler.getObject(object, instance.getContainer());
106+
} finally {
107+
instance.getContainer().getProcessing().clear();
108+
instance.getTypeRegistry().clear();
109+
}
105110
}
106111

107112
public void registerTypeExtension(Class<?> objectClass) {

0 commit comments

Comments
 (0)