Codota Logo
GraphQLObjectType$Builder.description
Code IndexAdd Codota to your IDE (free)

How to use
description
method
in
graphql.schema.GraphQLObjectType$Builder

Best Java code snippets using graphql.schema.GraphQLObjectType$Builder.description (Showing top 20 results out of 315)

  • Common ways to obtain GraphQLObjectType$Builder
private void myMethod () {
GraphQLObjectType$Builder g =
  • Codota IconString str2;String str;GraphQLObjectType.newObject().name(str2).description(str)
  • Codota IconString str;GraphQLObjectType.newObject().name(str)
  • Smart code suggestions by Codota
}
origin: graphql-java/graphql-java

builder.definition(typeDefinition);
builder.name(typeDefinition.getName());
builder.description(schemaGeneratorHelper.buildDescription(typeDefinition, typeDefinition.getDescription()));
origin: opentripplanner/OpenTripPlanner

.description("Agency in the graph")
.withInterface(nodeInterface)
.field(GraphQLFieldDefinition.newFieldDefinition()
origin: com.introproventures/graphql-jpa-query-schema

private GraphQLObjectType getObjectType(EntityType<?> entityType) {
  if (entityCache.containsKey(entityType))
    return entityCache.get(entityType);        
  
  
  GraphQLObjectType objectType = GraphQLObjectType.newObject()
      .name(entityType.getName())
      .description(getSchemaDescription( entityType.getJavaType()))
      .fields(entityType.getAttributes().stream()
        .filter(this::isNotIgnored)
        .map(this::getObjectField)
        .collect(Collectors.toList())
      )
      .build();
  
  entityCache.putIfAbsent(entityType, objectType);
  
  return objectType;
}
origin: graphql-java/graphql-java

void newType() {
  GraphQLObjectType simpsonCharacter = newObject()
      .name("SimpsonCharacter")
      .description("A Simpson character")
      .field(newFieldDefinition()
          .name("name")
          .description("The name of the character.")
          .type(GraphQLString))
      .field(newFieldDefinition()
          .name("mainCharacter")
          .description("One of the main Simpson characters?")
          .type(GraphQLBoolean))
      .build();
}
origin: bpatters/schemagen-graphql

public GraphQLSchemaBuilder() {
  this.rootQueryBuilder = GraphQLObjectType.newObject().name("Query").description("Root of Query Schema");
  this.rootMutationBuilder = GraphQLObjectType.newObject().name("Mutation").description("Root of Mutation Schema");
  this.defaultTypeConverters = getDefaultTypeConverters();
  try {
    classLoader = getClass().getClassLoader();
    classPath = ClassPath.from(classLoader);
  } catch (IOException ex) {
    Throwables.propagate(ex);
  }
}
origin: leangen/graphql-spqr

@Override
protected GraphQLObjectType toGraphQLType(String typeName, AnnotatedType javaType, OperationMapper operationMapper, BuildContext buildContext) {
  GraphQLObjectType.Builder builder = GraphQLObjectType.newObject()
      .name(typeName)
      .description(buildContext.typeInfoGenerator.generateTypeDescription(javaType, buildContext.messageBundle));
  Enum<E>[] keys = ClassUtils.<E>getRawType(getElementType(javaType, 0).getType()).getEnumConstants();
  Arrays.stream(keys).forEach(enumValue -> builder.field(GraphQLFieldDefinition.newFieldDefinition()
      .name(enumMapper.getValueName(enumValue, buildContext.messageBundle))
      .description(enumMapper.getValueDescription(enumValue, buildContext.messageBundle))
      .deprecate(enumMapper.getValueDeprecationReason(enumValue, buildContext.messageBundle))
      .type(operationMapper.toGraphQLType(getElementType(javaType, 1), buildContext))
      .dataFetcher(env -> ((Map)env.getSource()).get(enumValue))
      .build()));
  return builder.build();
}
origin: com.graphql-java/graphql-java

public GraphQLObjectType edgeType(String name, GraphQLOutputType nodeType, GraphQLInterfaceType nodeInterface, List<GraphQLFieldDefinition> edgeFields) {
  return newObject()
      .name(name + "Edge")
      .description("An edge in a connection")
      .field(newFieldDefinition()
          .name("node")
          .type(nodeType)
          .description("The item at the end of the edge"))
      .field(newFieldDefinition()
          .name("cursor")
          .type(nonNull(GraphQLString))
          .description("cursor marks a unique position or index into the connection"))
      .fields(edgeFields)
      .build();
}
origin: merapar/graphql-spring-boot-starter

@PostConstruct
public void postConstruct() {
  GraphQLObjectType.Builder queryBuilder = newObject().name(properties.getRootQueryName());
  GraphQLObjectType.Builder mutationBuilder = newObject().name(properties.getRootMutationName());
  if (StringUtils.hasText(properties.getRootQueryDescription())) {
    queryBuilder = queryBuilder.description(properties.getRootQueryDescription());
  }
  if (StringUtils.hasText(properties.getRootMutationDescription())) {
    mutationBuilder = mutationBuilder.description(properties.getRootMutationDescription());
  }
  buildSchemaFromDefinitions(queryBuilder, mutationBuilder);
}
origin: gentics/mesh

public GraphQLObjectType createFocalPointType() {
  Builder type = newObject().name("FocalPoint").description("Focal point");
  // .x
  type.field(newFieldDefinition().name("x").description("X-axis factor of the focal point. Left is 0 and middle is 0.5.").type(GraphQLFloat)
    .dataFetcher(fetcher -> {
      FocalPoint point = fetcher.getSource();
      return point.getX();
    }));
  // .y
  type.field(newFieldDefinition().name("y").description("Y-axis factor of the focal point. Top is 0 and middle is 0.5.").type(GraphQLFloat)
    .dataFetcher(fetcher -> {
      FocalPoint point = fetcher.getSource();
      return point.getY();
    }));
  return type.build();
}
origin: com.introproventures/graphql-jpa-query-schema

private GraphQLObjectType getEmbeddableType(EmbeddableType<?> embeddableType) {
  if (embeddableCache.containsKey(embeddableType))
    return embeddableCache.get(embeddableType);        
  String embeddableTypeName = namingStrategy.singularize(embeddableType.getJavaType().getSimpleName())+"EmbeddableType";
  
  GraphQLObjectType objectType = GraphQLObjectType.newObject()
      .name(embeddableTypeName)
      .description(getSchemaDescription( embeddableType.getJavaType()))
      .fields(embeddableType.getAttributes().stream()
        .filter(this::isNotIgnored)
        .map(this::getObjectField)
        .collect(Collectors.toList())
      )
      .build();
  
  embeddableCache.putIfAbsent(embeddableType, objectType);
  
  return objectType;
}

origin: semantic-integration/hypergraphql

private GraphQLObjectType registerGraphQLQueryType(TypeConfig type) {
  String typeName = type.getName();
  String description = "Top queryable predicates. " +
      "_GET queries return all objects of a given type, possibly restricted by limit and offset values. " +
      "_GET_BY_ID queries require a set of URIs to be specified.";
  List<GraphQLFieldDefinition> builtFields = new ArrayList<>();
  Map<String, FieldOfTypeConfig> fields = type.getFields();
  Set<String> fieldNames = fields.keySet();
  for (String fieldName : fieldNames) {
    builtFields.add(registerGraphQLQueryField(type.getField(fieldName)));
  }
  return newObject()
      .name(typeName)
      .description(description)
      .fields(builtFields)
      .build();
}
origin: semantic-integration/hypergraphql

private GraphQLObjectType registerGraphQLType(TypeConfig type) {
  String typeName = type.getName();
  String uri = this.hgqlSchema.getTypes().get(typeName).getId();
  String description = "Instances of \"" + uri + "\".";
  List<GraphQLFieldDefinition> builtFields = new ArrayList<>();
  Map<String, FieldOfTypeConfig> fields = type.getFields();
  Set<String> fieldNames = fields.keySet();
  for (String fieldName : fieldNames) {
    builtFields.add(registerGraphQLField(type.getField(fieldName)));
  }
  builtFields.add(getidField());
  builtFields.add(gettypeField());
  return newObject()
      .name(typeName)
      .description(description)
      .fields(builtFields)
      .build();
}
origin: semantic-integration/hypergraphql

private GraphQLObjectType registerGraphQLType(TypeConfig type) {
  String typeName = type.getName();
  String uri = this.hgqlSchema.getTypes().get(typeName).getId();
  String description = "Instances of \"" + uri + "\".";
  List<GraphQLFieldDefinition> builtFields = new ArrayList<>();
  Map<String, FieldOfTypeConfig> fields = type.getFields();
  Set<String> fieldNames = fields.keySet();
  for (String fieldName : fieldNames) {
    builtFields.add(registerGraphQLField(type.getField(fieldName)));
  }
  builtFields.add(getidField());
  builtFields.add(gettypeField());
  return newObject()
      .name(typeName)
      .description(description)
      .fields(builtFields)
      .build();
}
origin: semantic-integration/hypergraphql

private GraphQLObjectType registerGraphQLQueryType(TypeConfig type) {
  String typeName = type.getName();
  String description = "Top queryable predicates. " +
      "_GET queries return all objects of a given type, possibly restricted by limit and offset values. " +
      "_GET_BY_ID queries require a set of URIs to be specified.";
  List<GraphQLFieldDefinition> builtFields = new ArrayList<>();
  Map<String, FieldOfTypeConfig> fields = type.getFields();
  Set<String> fieldNames = fields.keySet();
  for (String fieldName : fieldNames) {
    builtFields.add(registerGraphQLQueryField(type.getField(fieldName)));
  }
  return newObject()
      .name(typeName)
      .description(description)
      .fields(builtFields)
      .build();
}
origin: gentics/mesh

public GraphQLObjectType createType() {
  Builder roleType = newObject();
  roleType.name(ROLE_TYPE_NAME);
  roleType.description("Role description");
  interfaceTypeProvider.addCommonFields(roleType);
  // .name
  roleType.field(newFieldDefinition().name("name").description("The name of the role").type(GraphQLString).dataFetcher((env) -> {
    Role role = env.getSource();
    return role.getName();
  }));
  // .groups
  roleType.field(newPagingFieldWithFetcher("groups", "Groups which reference the role.", (env) -> {
    Role role = env.getSource();
    GraphQLContext gc = env.getContext();
    return role.getGroups(gc.getUser(), getPagingInfo(env));
  }, GROUP_PAGE_TYPE_NAME));
  return roleType.build();
}
origin: graphql-java/graphql-java

public GraphQLObjectType edgeType(String name, GraphQLOutputType nodeType, GraphQLInterfaceType nodeInterface, List<GraphQLFieldDefinition> edgeFields) {
  return newObject()
      .name(name + "Edge")
      .description("An edge in a connection")
      .field(newFieldDefinition()
          .name("node")
          .type(nodeType)
          .description("The item at the end of the edge"))
      .field(newFieldDefinition()
          .name("cursor")
          .type(nonNull(GraphQLString))
          .description("cursor marks a unique position or index into the connection"))
      .fields(edgeFields)
      .build();
}
origin: leangen/graphql-spqr

private GraphQLOutputType mapEntry(GraphQLOutputType keyType, GraphQLOutputType valueType, BuildContext buildContext) {
  String typeName = "mapEntry_" + getTypeName(keyType) + "_" + getTypeName(valueType);
  if (buildContext.typeCache.contains(typeName)) {
    return new GraphQLTypeReference(typeName);
  }
  buildContext.typeCache.register(typeName);
  return newObject()
      .name(typeName)
      .description("Map entry")
      .field(newFieldDefinition()
          .name("key")
          .description("Map key")
          .type(keyType)
          .build())
      .field(newFieldDefinition()
          .name("value")
          .description("Map value")
          .type(valueType)
          .build())
      .build();
}
origin: graphql-java/graphql-java

public GraphQLObjectType connectionType(String name, GraphQLObjectType edgeType, List<GraphQLFieldDefinition> connectionFields) {
  return newObject()
      .name(name + "Connection")
      .description("A connection to a list of items.")
      .field(newFieldDefinition()
          .name("edges")
          .description("a list of edges")
          .type(list(edgeType)))
      .field(newFieldDefinition()
          .name("pageInfo")
          .description("details about this specific page")
          .type(nonNull(pageInfoType)))
      .fields(connectionFields)
      .build();
}
origin: com.introproventures/graphql-jpa-query-schema

private GraphQLObjectType getQueryType() {
  GraphQLObjectType.Builder queryType = 
    GraphQLObjectType.newObject()
      .name(this.name)
      .description(this.description);
  queryType.fields(
    entityManager.getMetamodel()
      .getEntities().stream()
      .filter(this::isNotIgnored)
      .map(this::getQueryFieldByIdDefinition)
      .collect(Collectors.toList())
  );
  
  queryType.fields(
    entityManager.getMetamodel()
      .getEntities().stream()
      .filter(this::isNotIgnored)
      .map(this::getQueryFieldSelectDefinition)
      .collect(Collectors.toList())
  );
  return queryType.build();
}
origin: com.graphql-java/graphql-java

public GraphQLObjectType connectionType(String name, GraphQLObjectType edgeType, List<GraphQLFieldDefinition> connectionFields) {
  return newObject()
      .name(name + "Connection")
      .description("A connection to a list of items.")
      .field(newFieldDefinition()
          .name("edges")
          .description("a list of edges")
          .type(list(edgeType)))
      .field(newFieldDefinition()
          .name("pageInfo")
          .description("details about this specific page")
          .type(nonNull(pageInfoType)))
      .fields(connectionFields)
      .build();
}
graphql.schemaGraphQLObjectType$Builderdescription

Popular methods of GraphQLObjectType$Builder

  • name
  • build
  • field
    Take a field builder in a function definition and apply. Can be used in a jdk8 lambda e.g.: field(f
  • fields
  • withInterface
  • <init>
  • withDirective
  • definition
  • hasField
  • withDirectives
  • withInterfaces
  • withInterfaces

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • onRequestPermissionsResult (Fragment)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • BoxLayout (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now