Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/test/groovy/graphql/GarfieldSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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)
Expand Down