Interface FieldOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ResolvableFieldOptions
All Known Implementing Classes:
FieldOptions.Jsii$Proxy, ResolvableFieldOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.501Z") @Stability(Experimental) public interface FieldOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Properties for configuring a field.

Example:

 Field field = Field.Builder.create()
         .returnType(GraphqlType.string())
         .args(Map.of(
                 "argument", GraphqlType.string()))
         .build();
 InterfaceType type = InterfaceType.Builder.create("Node")
         .definition(Map.of("test", field))
         .build();
 
  • Method Details

    • getReturnType

      @Stability(Experimental) @NotNull GraphqlType getReturnType()
      (experimental) The return type for this field.
    • getArgs

      @Stability(Experimental) @Nullable default Map<String,GraphqlType> getArgs()
      (experimental) The arguments for this field.

      i.e. type Example (first: String second: String) {}

      • where 'first' and 'second' are key values for args and 'String' is the GraphqlType

      Default: - no arguments

    • getDirectives

      @Stability(Experimental) @Nullable default List<Directive> getDirectives()
      (experimental) the directives for this field.

      Default: - no directives

    • builder

      @Stability(Experimental) static FieldOptions.Builder builder()
      Returns:
      a FieldOptions.Builder of FieldOptions