Skip to content

Commit

Permalink
Merge pull request #104 from apollographql/sachin/tweak-documentation…
Browse files Browse the repository at this point in the history
…-around-empty-query-types

graphql-java-support: Clarify documentation around empty query types
  • Loading branch information
sachindshinde committed Apr 16, 2021
2 parents da19ee5 + 008dea7 commit e466409
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ public static SchemaTransformer transform(final GraphQLSchema schema) {

// Note that GraphQLSchema does not support empty object types as of graphql-java v16. If you
// would like the query type to be empty, then add a dummy field to the query type in the given
// GraphQLSchema and pass queryTypeShouldBeEmpty as true. You can also use a transform()
// overload that accepts something other than a GraphQLSchema, as those overloads will
// automatically handle this for you. The output schema won't contain the dummy field, nor will
// it be visible to the gateway.
// GraphQLSchema and pass queryTypeShouldBeEmpty as true. The output schema won't contain the
// dummy field, nor will it be visible to the gateway.
//
// You can also use a transform() overload that accepts something other than a GraphQLSchema,
// as those overloads do allow their inputs to specify an empty query type.
@NotNull
public static SchemaTransformer transform(final GraphQLSchema schema, final boolean queryTypeShouldBeEmpty) {
return new SchemaTransformer(schema, queryTypeShouldBeEmpty);
Expand Down

0 comments on commit e466409

Please sign in to comment.