From 5ce15ac62ecc2ca333affc630a49587ff33ea510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Glas=C3=B8=20Skifjeld?= Date: Tue, 20 Oct 2015 22:56:05 +0200 Subject: [PATCH] Fix example for GraphQLUnionType --- README.md | 2 +- src/test/groovy/graphql/GarfieldSchema.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2633a5683f..6792aba24d 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ GraphQLInterfaceType comicCharacter = newInterface() Example: (a snippet from [here](src/test/groovy/graphql/GarfieldSchema.java)) ```java -PetType = GraphQLUnionType.newUnionType() +GraphQLUnionType PetType = newUnionType() .name("Pet") .possibleType(CatType) .possibleType(DogType) diff --git a/src/test/groovy/graphql/GarfieldSchema.java b/src/test/groovy/graphql/GarfieldSchema.java index 226d62f079..bda0a3349a 100644 --- a/src/test/groovy/graphql/GarfieldSchema.java +++ b/src/test/groovy/graphql/GarfieldSchema.java @@ -13,6 +13,7 @@ import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition; import static graphql.schema.GraphQLInterfaceType.newInterface; import static graphql.schema.GraphQLObjectType.newObject; +import static graphql.schema.GraphQLUnionType.newUnionType; public class GarfieldSchema { @@ -149,7 +150,7 @@ public GraphQLObjectType getType(Object object) { .withInterface(NamedType) .build(); - public static GraphQLUnionType PetType = GraphQLUnionType.newUnionType() + public static GraphQLUnionType PetType = newUnionType() .name("Pet") .possibleType(CatType) .possibleType(DogType)