create_schema_type(agooErr err) {
    gqlType	type;
    gqlType	type_type;
    gqlType	type_nn;
    gqlType	type_nn_list;
    gqlType	type_nn_list_nn;
    gqlType	dir_type;
    gqlType	dir_nn;
    gqlType	dir_nn_list;
    gqlType	dir_nn_list_nn;

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

	NULL == (type_type = gql_assure_type(err, "__Type")) ||
	NULL == (type_nn = gql_assure_nonnull(err, type_type)) ||
	NULL == (type_nn_list = gql_assure_list(err, type_nn)) ||
	NULL == (type_nn_list_nn = gql_assure_nonnull(err, type_nn_list)) ||
	NULL == (dir_type = gql_assure_type(err, "__Directive")) ||
	NULL == (dir_nn = gql_assure_nonnull(err, dir_type)) ||
	NULL == (dir_nn_list = gql_assure_list(err, dir_nn)) ||
	NULL == (dir_nn_list_nn = gql_assure_nonnull(err, dir_nn_list)) ||

	NULL == gql_type_field(err, type, "types", type_nn_list_nn, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "queryType", type_nn, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "mutationType", type_type, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "subscriptionType", type_type, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "directives", dir_nn_list_nn, NULL, NULL, 0)) {

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

    return AGOO_ERR_OK;
}
create_schema_type(agooErr err) {
    gqlType	type;
    gqlType	type_type;
    gqlType	type_nn;
    gqlType	type_nn_list;
    gqlType	type_nn_list_nn;
    gqlType	dir_type;
    gqlType	dir_nn;
    gqlType	dir_nn_list;
    gqlType	dir_nn_list_nn;

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

	NULL == (type_type = gql_assure_type(err, "__Type")) ||
	NULL == (type_nn = gql_assure_nonnull(err, type_type)) ||
	NULL == (type_nn_list = gql_assure_list(err, type_nn)) ||
	NULL == (type_nn_list_nn = gql_assure_nonnull(err, type_nn_list)) ||
	NULL == (dir_type = gql_assure_type(err, "__Directive")) ||
	NULL == (dir_nn = gql_assure_nonnull(err, dir_type)) ||
	NULL == (dir_nn_list = gql_assure_list(err, dir_nn)) ||
	NULL == (dir_nn_list_nn = gql_assure_nonnull(err, dir_nn_list)) ||

	NULL == gql_type_field(err, type, "types", type_nn_list_nn, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "queryType", type_nn, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "mutationType", type_type, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "subscriptionType", type_type, NULL, NULL, 0) ||
	NULL == gql_type_field(err, type, "directives", dir_nn_list_nn, NULL, NULL, 0)) {

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

    return AGOO_ERR_OK;
}