/** * Factory method for creating a Field instance representing a custom {@link Type#OBJECT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing custom {@link Type#OBJECT} */ public static ResponseField forObject(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.OBJECT, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#DOUBLE}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#DOUBLE} */ public static ResponseField forDouble(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.DOUBLE, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#ENUM}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#ENUM} */ public static ResponseField forEnum(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.ENUM, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#LIST}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#LIST} */ public static ResponseField forList(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.LIST, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#STRING}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#STRING} */ public static ResponseField forString(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.STRING, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#INT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#INT} */ public static ResponseField forInt(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.INT, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#LONG}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#LONG} */ public static ResponseField forLong(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.LONG, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#BOOLEAN}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#BOOLEAN} */ public static ResponseField forBoolean(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.BOOLEAN, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#INLINE_FRAGMENT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param typeConditions conditional GraphQL types * @return Field instance representing {@link Type#INLINE_FRAGMENT} */ public static ResponseField forInlineFragment(String responseName, String fieldName, List<String> typeConditions) { List<Condition> conditions = new ArrayList<>(typeConditions.size()); for (String typeCondition : typeConditions) { conditions.add(Condition.typeCondition(typeCondition)); } return new ResponseField(Type.INLINE_FRAGMENT, responseName, fieldName, Collections.<String, Object>emptyMap(), false, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#FRAGMENT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param typeConditions conditional GraphQL types * @return Field instance representing {@link Type#FRAGMENT} */ public static ResponseField forFragment(String responseName, String fieldName, List<String> typeConditions) { List<Condition> conditions = new ArrayList<>(typeConditions.size()); for (String typeCondition : typeConditions) { conditions.add(Condition.typeCondition(typeCondition)); } return new ResponseField(Type.FRAGMENT, responseName, fieldName, Collections.<String, Object>emptyMap(), false, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#DOUBLE}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#DOUBLE} */ public static ResponseField forDouble(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.DOUBLE, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#INT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#INT} */ public static ResponseField forInt(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.INT, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#BOOLEAN}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#BOOLEAN} */ public static ResponseField forBoolean(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.BOOLEAN, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#ENUM}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#ENUM} */ public static ResponseField forEnum(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.ENUM, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#LIST}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#LIST} */ public static ResponseField forList(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.LIST, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#STRING}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#STRING} */ public static ResponseField forString(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.STRING, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#INT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#INT} */ public static ResponseField forInt(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.INT, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#LONG}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#LONG} */ public static ResponseField forLong(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.LONG, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing a custom {@link Type#OBJECT}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing custom {@link Type#OBJECT} */ public static ResponseField forObject(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.OBJECT, responseName, fieldName, arguments, optional, conditions); }
/** * Factory method for creating a Field instance representing {@link Type#STRING}. * * @param responseName alias for the result of a field * @param fieldName name of the field in the GraphQL operation * @param arguments arguments to be passed along with the field * @param optional whether the arguments passed along are optional or required * @param conditions list of conditions for this field * @return Field instance representing {@link Type#STRING} */ public static ResponseField forString(String responseName, String fieldName, Map<String, Object> arguments, boolean optional, List<Condition> conditions) { return new ResponseField(Type.STRING, responseName, fieldName, arguments, optional, conditions); }