GraphQLObjectType<P> constructor
GraphQLObjectType<P> (
- String name, {
- String? description,
- bool isInterface = false,
- ResolveType<
GraphQLObjectType< ? resolveType,P> > - IsTypeOf<
P> ? isTypeOf, - Iterable<
GraphQLObjectField< fields = const [],Object?, Object?, P> > - Iterable<
GraphQLObjectType> interfaces = const [], - GraphQLTypeDefinitionExtra<
TypeDefinitionNode, TypeExtensionNode> extra = const GraphQLTypeDefinitionExtra.attach([]),
A GraphQLType that specifies the shape of structured data, with multiple fields that can be resolved independently of one another.
Implementation
GraphQLObjectType(
this.name, {
this.description,
this.isInterface = false,
ResolveType<GraphQLObjectType<P>>? resolveType,
IsTypeOf<P>? isTypeOf,
Iterable<GraphQLObjectField<Object?, Object?, P>> fields = const [],
Iterable<GraphQLObjectType> interfaces = const [],
this.extra = const GraphQLTypeDefinitionExtra.attach([]),
}) : isTypeOf = isTypeOf == null ? null : IsTypeOfWrapper(isTypeOf),
resolveType =
resolveType == null ? null : ResolveTypeWrapper(resolveType) {
this.fields.addAll(fields);
inheritFromMany(interfaces);
}