public static Builder newSchema ( GraphQLSchema existingSchema ) { return new Builder ( ) . query ( existingSchema . getQueryType ( ) ) . mutation ( existingSchema . getMutationType ( ) ) . subscription ( existingSchema . getSubscriptionType ( ) ) . codeRegistry ( existingSchema . getCodeRegistry ( ) ) . clearAdditionalTypes ( ) . clearDirectives ( ) . additionalDirectives ( existingSchema . directives ) . additionalTypes ( existingSchema . additionalTypes ) ; }
This allows you to build a schema from an existing schema . It copies everything from the existing schema and then allows you to replace them .