common/schema-builder/src/main/java/io/smallrye/graphql/schema/creator/FieldCreator.java
/**
     * Creates a field from a field and method.
     * Used by Type and Input
     *
     * @param direction the direction (in/out)
     * @param fieldInfo the java property
     * @param methodInfo the java method
     * @return a Field model object
     */
Creates a field from a field and method.
Used by Type and Input

@param direction the direction (in/out)
@param fieldInfo the java property
@param methodInfo the java method
@return a Field model object
Creates a field from a field and method . Used by Type and Input @param direction the direction ( in / out ) @param fieldInfo the java property @param methodInfo the java method @return a Field model object
public Optional<Field> createFieldForPojo(Direction direction, FieldInfo fieldInfo, MethodInfo methodInfo,
            Reference parentObjectReference) {
        Annotations annotationsForPojo = Annotations.getAnnotationsForPojo(direction, fieldInfo, methodInfo);
        if (isGraphQlField(direction, fieldInfo, methodInfo)) {
            Type methodType = getMethodType(methodInfo, direction);
            String name = getFieldName(direction, annotationsForPojo, methodInfo.name());
            validateFieldType(direction, methodInfo);
            Type fieldType = getFieldType(fieldInfo, methodType);
            Reference reference = referenceCreator.createReferenceForPojoField(direction, fieldType, methodType,
                    annotationsForPojo, parentObjectReference);
            Field field = new Field(methodInfo.name(), MethodHelper.getPropertyName(direction, methodInfo.name()), name,
                    reference);
            field.setWrapper(WrapperCreator.createWrapper(fieldType, methodType).orElse(null));
            configure2(field, methodType, annotationsForPojo);
            return Optional.of(field);
        }
        return Optional.empty();
    }
public Optional < Field > createFieldForPojo ( Direction direction , FieldInfo fieldInfo , MethodInfo methodInfo , Reference parentObjectReference ) { Annotations annotationsForPojo = Annotations . getAnnotationsForPojo ( direction , fieldInfo , methodInfo ) ; if ( isGraphQlField ( direction , fieldInfo , methodInfo ) ) { Type methodType = getMethodType ( methodInfo , direction ) ; String name = getFieldName ( direction , annotationsForPojo , methodInfo . name ( ) ) ; validateFieldType ( direction , methodInfo ) ; Type fieldType = getFieldType ( fieldInfo , methodType ) ; Reference reference = referenceCreator . createReferenceForPojoField ( direction , fieldType , methodType , annotationsForPojo , parentObjectReference ) ; Field field = new Field ( methodInfo . name ( ) , MethodHelper . getPropertyName ( direction , methodInfo . name ( ) ) , name , reference ) ; field . setWrapper ( WrapperCreator . createWrapper ( fieldType , methodType ) . orElse ( null ) ) ; configure2 ( field , methodType , annotationsForPojo ) ; return Optional . of ( field ) ; } return Optional . empty ( ) ; }
Creates a field from a field and method.
Creates a field from a field and method .
// Name // Field Type // Wrapper