Class MutationTypeResolverMethodGenerator

All Implemented Interfaces:
MethodGenerator

public class MutationTypeResolverMethodGenerator extends UpdateResolverMethodGenerator
This class generates the resolvers for update queries with the GenerationDirective.MUTATION directive set.
  • Constructor Details

    • MutationTypeResolverMethodGenerator

      public MutationTypeResolverMethodGenerator(ObjectField localField, ProcessedSchema processedSchema)
  • Method Details

    • transformInputs

      protected no.sikt.graphitron.javapoet.CodeBlock transformInputs(List<? extends InputField> specInputs, boolean hasRecords)
      Overrides:
      transformInputs in class ResolverMethodGenerator
      Returns:
      List of variable names for the declared and fully set records.
    • generateSchemaOutputs

      protected no.sikt.graphitron.javapoet.CodeBlock generateSchemaOutputs(ObjectField target)
      Specified by:
      generateSchemaOutputs in class UpdateResolverMethodGenerator
      Returns:
      Code that both fetches record data and creates the appropriate response objects.
    • generateAll

      public List<no.sikt.graphitron.javapoet.MethodSpec> generateAll()
      Returns:
      List of complete javapoet MethodSpec that can be generated for this object.