Skip to content

Commit 561909f

Browse files
dupskibbakerman
authored andcommitted
Use builder for GraphQLSchema (master)
1 parent 3e97d52 commit 561909f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/documentation/master/schema.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ To make a programmatically-generated schema executable, you can just instantiate
287287
.dataFetcher(new StaticDataFetcher("world!"))
288288
.build();
289289

290-
GraphQLSchema schema = new GraphQLSchema(queryType);
290+
GraphQLSchema schema = GraphQLSchema.newSchema()
291+
.query(queryType)
292+
.build();
291293

292294
// Make the schema executable
293295
GraphQL executor = GraphQL.newGraphQL(graphQLSchema).build()

0 commit comments

Comments
 (0)