GraphQLObject constructor

const GraphQLObject({
  1. List<String> interfaces = const [],
  2. bool? omitFields,
  3. bool? nullableFields,
  4. String? name,
})

Signifies that a class should statically generate a GraphQLType.

Generates a GraphQLObjectType for classes with GraphQLObjectType.isInterface == true for abstract classes, a GraphQLEnumType for enums and a GraphQLUnionType for freezed unions.

if omitFields is true, omits all fields by default, you would need to decorate explicitly with GraphQLField. No need to pass omit: false in GraphQLField's constructor. interfaces are the getters of GraphQLObjectType implemented by this object.

Implementation

const GraphQLObject({
  this.interfaces = const [],
  this.omitFields,
  this.nullableFields,
  this.name,
});