FieldDefinition.ofInput constructor

FieldDefinition.ofInput(
  1. GraphQLScanResult model,
  2. InputValueDefinitionNode node, {
  3. required String entityName,
  4. bool isReadOnly = false,
  5. bool isFlattened = false,
  6. bool isId = false,
  7. bool isEager = false,
  8. String? eagerPrefix,
  9. bool isLazy = false,
  10. bool isAutogenerateId = false,
  11. bool isWriteOnly = false,
})

Implementation

FieldDefinition.ofInput(
  this.model,
  InputValueDefinitionNode node, {
  required this.entityName,
  this.isReadOnly = false,
  this.isFlattened = false,
  this.isId = false,
  this.isEager = false,
  this.eagerPrefix,
  this.isLazy = false,
  this.isAutogenerateId = false,
  this.isWriteOnly = false,
})  : name = node.name.value,
      original = node,
      args = [],
      isRelationship = node.type.toRawType().contains('GraphRef'),
      relationship = null,
      typeNode = node.type is ListTypeNode ? (node.type as ListTypeNode).type : node.type,
      isList = node.type is ListTypeNode,
      dartTypeName = node.type.toDartType(withNullability: false),
      isNonNull = node.type.isNonNull;