getType method
Retrieves a Type object.
May throw BadRequestException.
May throw ConcurrentModificationException.
May throw InternalFailureException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter apiId :
The API ID.
Parameter format :
The type format: SDL or JSON.
Parameter typeName :
The type name.
Implementation
Future<GetTypeResponse> getType({
required String apiId,
required TypeDefinitionFormat format,
required String typeName,
}) async {
final $query = <String, List<String>>{
'format': [format.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/apis/${Uri.encodeComponent(apiId)}/types/${Uri.encodeComponent(typeName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetTypeResponse.fromJson(response);
}