@Test void testEmpty() { final GraphQLSchema federated = Federation.transform(emptySDL) .build(); Assertions.assertEquals("directive @extends on OBJECT | INTERFACE\n" + "\n" + "directive @external on FIELD_DEFINITION\n" + "\n" + "directive @key(fields: _FieldSet!) on OBJECT | INTERFACE\n" + "\n" + "directive @provides(fields: _FieldSet!) on FIELD_DEFINITION\n" + "\n" + "directive @requires(fields: _FieldSet!) on FIELD_DEFINITION\n" + "\n" + "type Query {\n" + " _service: _Service\n" + "}\n" + "\n" + "type _Service {\n" + " sdl: String!\n" + "}\n" + "\n" + "scalar _FieldSet\n", new FederationSdlPrinter(FederationSdlPrinter.Options.defaultOptions() .includeScalarTypes(true) .includeDirectiveDefinitions(def -> !standardDirectives.contains(def.getName())) ).print(federated) ); final GraphQLType _Service = federated.getType("_Service"); assertNotNull(_Service, "_Service type present"); final GraphQLFieldDefinition _service = federated.getQueryType().getFieldDefinition("_service"); assertNotNull(_service, "_service field present"); assertEquals(_Service, _service.getType(), "_service returns _Service"); SchemaUtils.assertSDL(federated, emptySDL); }
@NotNull public static SchemaTransformer transform(final GraphQLSchema schema) { return new SchemaTransformer(schema); }
Federation { @NotNull public static SchemaTransformer transform(final GraphQLSchema schema) { return new SchemaTransformer(schema); } }
Federation { @NotNull public static SchemaTransformer transform(final GraphQLSchema schema) { return new SchemaTransformer(schema); } private  Federation(); }
Federation { @NotNull public static SchemaTransformer transform(final GraphQLSchema schema) { return new SchemaTransformer(schema); } private  Federation(); @NotNull static SchemaTransformer transform(final GraphQLSchema schema); static SchemaTransformer transform(final TypeDefinitionRegistry typeRegistry, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final TypeDefinitionRegistry typeRegistry); static SchemaTransformer transform(final String sdl, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final Reader sdl, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final File sdl, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final String sdl); static SchemaTransformer transform(final Reader sdl); static SchemaTransformer transform(final File sdl); }
Federation { @NotNull public static SchemaTransformer transform(final GraphQLSchema schema) { return new SchemaTransformer(schema); } private  Federation(); @NotNull static SchemaTransformer transform(final GraphQLSchema schema); static SchemaTransformer transform(final TypeDefinitionRegistry typeRegistry, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final TypeDefinitionRegistry typeRegistry); static SchemaTransformer transform(final String sdl, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final Reader sdl, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final File sdl, final RuntimeWiring runtimeWiring); static SchemaTransformer transform(final String sdl); static SchemaTransformer transform(final Reader sdl); static SchemaTransformer transform(final File sdl);  }