create_type_type(agooErr err) {
    gqlType	type;
    gqlField	fields = NULL;
    gqlField	enum_values = NULL;
    gqlValue	dv;
    gqlType	kind_type;
    gqlType	kind_nn;
    gqlType	type_nn;
    gqlType	type_nn_list;
    gqlType	field_type;
    gqlType	field_nn;
    gqlType	field_list;
    gqlType	enum_type;
    gqlType	enum_nn;
    gqlType	enum_nn_list;
    gqlType	input_type;
    gqlType	input_nn;
    gqlType	input_nn_list;

    if (NULL == (type = gql_type_create(err, "__Type", NULL, 0, NULL)) ||

	NULL == (type_nn = gql_assure_nonnull(err, type)) ||
	NULL == (type_nn_list = gql_assure_list(err, type_nn)) ||
	NULL == (field_type = gql_assure_type(err, "__Field")) ||
	NULL == (field_nn = gql_assure_nonnull(err, field_type)) ||
	NULL == (field_list = gql_assure_list(err, field_nn)) ||
	NULL == (kind_type = gql_assure_type(err, "__TypeKind")) ||
	NULL == (kind_nn = gql_assure_nonnull(err, kind_type)) ||
	NULL == (enum_type = gql_assure_type(err, "__EnumValue")) ||
	NULL == (enum_nn = gql_assure_nonnull(err, enum_type)) ||
	NULL == (enum_nn_list = gql_assure_list(err, enum_nn)) ||
	NULL == (input_type = gql_assure_type(err, "__InputValue")) ||
	NULL == (input_nn = gql_assure_nonnull(err, input_type)) ||
	NULL == (input_nn_list = gql_assure_list(err, input_nn)) ||

	NULL == gql_type_field(err, type, "kind", kind_nn, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "name", &gql_string_type, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "description", &gql_string_type, NULL, NULL, 0) ||
	NULL == (fields = gql_type_field(err, type, "fields", field_list, NULL, NULL, 0)) ||
	NULL == gql_type_field(err, type, "interfaces", type_nn_list, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "possibleTypes", type_nn_list, NULL, NULL, 0) ||
	NULL == (enum_values = gql_type_field(err, type, "enumValues", enum_nn_list, NULL, NULL, 0)) ||
	NULL == gql_type_field(err, type, "inputFields", input_nn_list, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "ofType", type, NULL, NULL, 0)) {

	return err->code;
    }
    type->core = true;

    if (NULL == (dv = gql_bool_create(err, false)) ||

	NULL == gql_field_arg(err, fields, "includeDeprecated", &gql_bool_type, NULL, 0, dv) ||
	NULL == (dv = gql_bool_create(err, false)) ||
	NULL == gql_field_arg(err, enum_values, "includeDeprecated", &gql_bool_type, NULL, 0, dv)) {

	return err->code;
    }
    return AGOO_ERR_OK;
}
create_type_type(agooErr err) {
    gqlType	type;
    gqlField	fields = NULL;
    gqlField	enum_values = NULL;
    gqlValue	dv;
    gqlType	kind_type;
    gqlType	kind_nn;
    gqlType	type_nn;
    gqlType	type_nn_list;
    gqlType	field_type;
    gqlType	field_nn;
    gqlType	field_list;
    gqlType	enum_type;
    gqlType	enum_nn;
    gqlType	enum_nn_list;
    gqlType	input_type;
    gqlType	input_nn;
    gqlType	input_nn_list;

    if (NULL == (type = gql_type_create(err, "__Type", NULL, 0, NULL)) ||

	NULL == (type_nn = gql_assure_nonnull(err, type)) ||
	NULL == (type_nn_list = gql_assure_list(err, type_nn)) ||
	NULL == (field_type = gql_assure_type(err, "__Field")) ||
	NULL == (field_nn = gql_assure_nonnull(err, field_type)) ||
	NULL == (field_list = gql_assure_list(err, field_nn)) ||
	NULL == (kind_type = gql_assure_type(err, "__TypeKind")) ||
	NULL == (kind_nn = gql_assure_nonnull(err, kind_type)) ||
	NULL == (enum_type = gql_assure_type(err, "__EnumValue")) ||
	NULL == (enum_nn = gql_assure_nonnull(err, enum_type)) ||
	NULL == (enum_nn_list = gql_assure_list(err, enum_nn)) ||
	NULL == (input_type = gql_assure_type(err, "__InputValue")) ||
	NULL == (input_nn = gql_assure_nonnull(err, input_type)) ||
	NULL == (input_nn_list = gql_assure_list(err, input_nn)) ||

	NULL == gql_type_field(err, type, "kind", kind_nn, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "name", &gql_string_type, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "description", &gql_string_type, NULL, NULL, 0) ||
	NULL == (fields = gql_type_field(err, type, "fields", field_list, NULL, NULL, 0)) ||
	NULL == gql_type_field(err, type, "interfaces", type_nn_list, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "possibleTypes", type_nn_list, NULL, NULL, 0) ||
	NULL == (enum_values = gql_type_field(err, type, "enumValues", enum_nn_list, NULL, NULL, 0)) ||
	NULL == gql_type_field(err, type, "inputFields", input_nn_list, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "ofType", type, NULL, NULL, 0)) {

	return err->code;
    }
    type->core = true;

    if (NULL == (dv = gql_bool_create(err, false)) ||

	NULL == gql_field_arg(err, fields, "includeDeprecated", &gql_bool_type, NULL, 0, dv) ||
	NULL == (dv = gql_bool_create(err, false)) ||
	NULL == gql_field_arg(err, enum_values, "includeDeprecated", &gql_bool_type, NULL, 0, dv)) {

	return err->code;
    }
    return AGOO_ERR_OK;
}