Skip to content

Commit 3e97d52

Browse files
dupskibbakerman
authored andcommitted
Use builder for GraphQLSchema (v11)
1 parent 3ec4e79 commit 3e97d52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/documentation/v11/schema.md

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

274-
GraphQLSchema schema = new GraphQLSchema(queryType);
274+
GraphQLSchema schema = GraphQLSchema.newSchema()
275+
.query(queryType)
276+
.build()
275277

276278
// Make the schema executable
277279
GraphQL executor = GraphQL.newGraphQL(graphQLSchema).build()

0 commit comments

Comments
 (0)