File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
graphql-java-support/src/test/java/com/apollographql/federation/graphqljava Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,25 @@ class FederationTest {
36
36
void testEmpty () {
37
37
final GraphQLSchema federated = Federation .transform (emptySDL )
38
38
.build ();
39
- Assertions .assertEquals ("type Query {\n " +
39
+ Assertions .assertEquals ("directive @extends on OBJECT\n " +
40
+ "\n " +
41
+ "directive @external on FIELD_DEFINITION\n " +
42
+ "\n " +
43
+ "directive @key(fields: _FieldSet!) on OBJECT | INTERFACE\n " +
44
+ "\n " +
45
+ "directive @provides(fields: _FieldSet!) on FIELD_DEFINITION\n " +
46
+ "\n " +
47
+ "directive @requires(fields: _FieldSet!) on FIELD_DEFINITION\n " +
48
+ "\n " +
49
+ "type Query {\n " +
40
50
" _service: _Service\n " +
41
51
"}\n " +
42
52
"\n " +
43
53
"type _Service {\n " +
44
54
" sdl: String!\n " +
45
- "}\n " , SchemaUtils .printWithoutStandardDirectiveDefinitions (federated ));
55
+ "}\n " +
56
+ "\n " +
57
+ "scalar _FieldSet\n " , SchemaUtils .printWithoutStandardDirectiveDefinitions (federated ));
46
58
47
59
final GraphQLType _Service = federated .getType ("_Service" );
48
60
assertNotNull (_Service , "_Service type present" );
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ private SchemaUtils() {
22
22
23
23
static String printWithoutStandardDirectiveDefinitions (GraphQLSchema schema ) {
24
24
return new FederationSdlPrinter (FederationSdlPrinter .Options .defaultOptions ()
25
+ .includeScalarTypes (true )
25
26
.includeDirectives (directive -> !standardDirectives .contains (directive .getName ()))
26
27
).print (schema );
27
28
}
You can’t perform that action at this time.
0 commit comments