nextTypeWithNoPath method

Context nextTypeWithNoPath({
  1. required TypeDefinitionNode nextType,
  2. required Name nextFieldName,
  3. required Name nextClassName,
  4. Nullable<TypeDefinitionNode?>? ofUnion,
  5. Name? alias,
  6. List<Definition>? generatedClasses,
  7. List<QueryInput>? inputsClasses,
  8. List<FragmentDefinitionNode>? fragments,
})

Returns a copy of this context, with next type, but on the first path.

Implementation

Context nextTypeWithNoPath({
  required TypeDefinitionNode nextType,
  required Name nextFieldName,
  required Name nextClassName,
  Nullable<TypeDefinitionNode?>? ofUnion,
  Name? alias,
  List<Definition>? generatedClasses,
  List<QueryInput>? inputsClasses,
  List<FragmentDefinitionNode>? fragments,
}) =>
    Context(
      schema: schema,
      typeDefinitionNodeVisitor: typeDefinitionNodeVisitor,
      options: options,
      schemaMap: schemaMap,
      path: [],
      currentType: nextType,
      currentFieldName: nextFieldName,
      currentClassName: nextClassName,
      ofUnion: ofUnion == null ? this.ofUnion : ofUnion.value,
      alias: alias ?? this.alias,
      generatedClasses: generatedClasses ?? this.generatedClasses,
      inputsClasses: inputsClasses ?? this.inputsClasses,
      fragments: fragments ?? this.fragments,
      align: 0,
      usedEnums: usedEnums,
      usedInputObjects: usedInputObjects,
    );