public class UserTypeBuilder
extends com.atlassian.graphql.json.types.JsonObjectTypeBuilder
Person
objects.
This builder takes the properties of Person, User, KnownUser etc and combines the properties
into a single 'User' object. This pattern was chosen over interfaces, as interfaces require
more boilerplate queries.
To add add GraphQL specific properties, add them to {link UserFieldsProvider}.Constructor and Description |
---|
UserTypeBuilder(com.atlassian.graphql.spi.GraphQLTypeBuilder typeBuilder,
com.atlassian.graphql.spi.GraphQLExtensions extensions) |
Modifier and Type | Method and Description |
---|---|
graphql.schema.GraphQLType |
buildType(String typeName,
Type type,
AnnotatedElement element,
com.atlassian.graphql.spi.GraphQLTypeBuilderContext context) |
boolean |
canBuildType(Type type,
AnnotatedElement element) |
buildDefaultTypeResolver, buildField, buildFields, getFieldName
buildField, buildField, buildFields, buildFromTypes, getTypeBuilder, getTypeName
public UserTypeBuilder(com.atlassian.graphql.spi.GraphQLTypeBuilder typeBuilder, com.atlassian.graphql.spi.GraphQLExtensions extensions)
public boolean canBuildType(Type type, AnnotatedElement element)
canBuildType
in interface com.atlassian.graphql.spi.GraphQLTypeBuilder
canBuildType
in class com.atlassian.graphql.json.types.JsonObjectTypeBuilder
public graphql.schema.GraphQLType buildType(String typeName, Type type, AnnotatedElement element, com.atlassian.graphql.spi.GraphQLTypeBuilderContext context)
buildType
in interface com.atlassian.graphql.spi.GraphQLTypeBuilder
buildType
in class com.atlassian.graphql.types.ObjectTypeBuilder
Copyright © 2003–2019 Atlassian. All rights reserved.