@@ -1382,7 +1382,6 @@ type Query {
13821382 GraphQLSchema schema = new SchemaGenerator (). makeExecutableSchema(options, types, runtimeWiring)
13831383
13841384 def printOptions = defaultOptions()
1385- .includeScalarTypes(true )
13861385 .useAstDefinitions(true )
13871386 .includeSchemaDefinition(true )
13881387 def result = new SchemaPrinter (printOptions). print (schema)
@@ -1478,7 +1477,6 @@ type MySubscription {
14781477 GraphQLSchema schema = new SchemaGenerator (). makeExecutableSchema(options, types, runtimeWiring)
14791478
14801479 def printOptions = defaultOptions()
1481- .includeScalarTypes(true )
14821480 .useAstDefinitions(false )
14831481 .includeSchemaDefinition(true )
14841482 def result = new SchemaPrinter (printOptions). print (schema)
@@ -1529,102 +1527,6 @@ type MyQuery {
15291527'''
15301528 }
15311529
1532- def " can parse and print extend schema description" () {
1533- // DZ TODO: this is failing at the moment
1534- def sdl = '''
1535- directive @schemaDirective on SCHEMA
1536-
1537- """
1538- My schema block description
1539- """
1540- schema {
1541- mutation: MyMutation
1542- }
1543-
1544- """
1545- My extend schema description
1546- """
1547- extend schema @schemaDirective {
1548- query: MyQuery
1549- }
1550-
1551- type MyQuery {
1552- foo: String
1553- }
1554-
1555- type MyMutation {
1556- pizza: String
1557- }
1558- '''
1559-
1560- when :
1561- def runtimeWiring = newRuntimeWiring(). build()
1562-
1563- def options = SchemaGenerator.Options . defaultOptions()
1564- def types = new SchemaParser (). parse(sdl)
1565- GraphQLSchema schema = new SchemaGenerator (). makeExecutableSchema(options, types, runtimeWiring)
1566-
1567- def printOptions = defaultOptions()
1568- .includeScalarTypes(true )
1569- .useAstDefinitions(true )
1570- .includeSchemaDefinition(true )
1571- def result = new SchemaPrinter (printOptions). print (schema)
1572-
1573- then :
1574- result == ''' """
1575- My schema block description
1576- """
1577- schema {
1578- mutation: MyMutation
1579- }
1580-
1581- """
1582- My extend schema description
1583- """
1584- extend schema @schemaDirective {
1585- query: MyQuery
1586- }
1587-
1588- "Marks the field, argument, input field or enum value as deprecated"
1589- directive @deprecated(
1590- "The reason for the deprecation"
1591- reason: String = "No longer supported"
1592- ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
1593-
1594- "Directs the executor to include this field or fragment only when the `if` argument is true"
1595- directive @include(
1596- "Included when true."
1597- if: Boolean!
1598- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
1599-
1600- "Indicates an Input Object is a OneOf Input Object."
1601- directive @oneOf on INPUT_OBJECT
1602-
1603- directive @schemaDirective on SCHEMA
1604-
1605- "Directs the executor to skip this field or fragment when the `if` argument is true."
1606- directive @skip(
1607- "Skipped when true."
1608- if: Boolean!
1609- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
1610-
1611- "Exposes a URL that specifies the behaviour of this scalar."
1612- directive @specifiedBy(
1613- "The URL that specifies the behaviour of this scalar."
1614- url: String!
1615- ) on SCALAR
1616-
1617- type MyMutation {
1618- pizza: String
1619- }
1620-
1621- type MyQuery {
1622- foo: String
1623- }
1624- '''
1625- }
1626-
1627-
16281530 def " can print a schema as AST elements" () {
16291531 def sdl = '''
16301532 directive @directive1 on SCALAR
0 commit comments