public Builder(GraphQLEnumType existing) { this.name = existing.getName(); this.description = existing.getDescription(); this.definition = existing.getDefinition(); this.values.putAll(getByName(existing.getValues(), GraphQLEnumValueDefinition::getName)); this.directives.putAll(getByName(existing.getDirectives(), GraphQLDirective::getName)); }
} else if (descriptionHolder instanceof GraphQLEnumType) { GraphQLEnumType type = (GraphQLEnumType) descriptionHolder; return descriptionAndComments(type::getDescription, type::getDefinition, () -> type.getDefinition().getDescription()); } else if (descriptionHolder instanceof GraphQLFieldDefinition) { GraphQLFieldDefinition type = (GraphQLFieldDefinition) descriptionHolder;
public Builder(GraphQLEnumType existing) { this.name = existing.getName(); this.description = existing.getDescription(); this.definition = existing.getDefinition(); this.values.putAll(getByName(existing.getValues(), GraphQLEnumValueDefinition::getName)); this.directives.putAll(getByName(existing.getDirectives(), GraphQLDirective::getName)); }
private static GraphQLEnumType getEnum(final graphql.schema.GraphQLEnumType type){ final String name = type.getName(); if(REFUSED_OBJECT_TYPES.contains(name)){ return null; } final String id = generateId(); final GraphQLEnumType graphQLEnumType = new GraphQLEnumType(); graphQLEnumType.setId(id); graphQLEnumType.setName(name); graphQLEnumType.setDescription(type.getDescription()); for(EnumValueDefinition definition : type.getDefinition().getEnumValueDefinitions()){ GraphQLEnumValueDefinition enumValueDefinition = new GraphQLEnumValueDefinition(); enumValueDefinition.setName(definition.getName()); graphQLEnumType.getDefinitions().add(enumValueDefinition); } return graphQLEnumType; }
} else if (descriptionHolder instanceof GraphQLEnumType) { GraphQLEnumType type = (GraphQLEnumType) descriptionHolder; return descriptionAndComments(type::getDescription, type::getDefinition, () -> type.getDefinition().getDescription()); } else if (descriptionHolder instanceof GraphQLFieldDefinition) { GraphQLFieldDefinition type = (GraphQLFieldDefinition) descriptionHolder;