type_kind(agooErr err, gqlDoc doc, gqlCobj obj, gqlField field, gqlSel sel, gqlValue result, int depth) {
    const char	*kind = NULL;
    const char	*key = sel->name;

    switch (((gqlType)obj->ptr)->kind) {
    case GQL_SCHEMA:	kind = "SCHEMA";	break;
    case GQL_OBJECT:	kind = "OBJECT";	break;
    case GQL_INPUT:	kind = "INPUT_OBJECT";	break;
    case GQL_UNION:	kind = "UNION";		break;
    case GQL_INTERFACE:	kind = "INTERFACE";	break;
    case GQL_ENUM:	kind = "ENUM";		break;
    case GQL_SCALAR:	kind = "SCALAR";	break;
    case GQL_LIST:	kind = "LIST";		break;
    case GQL_NON_NULL:	kind = "NON_NULL";	break;
    default:
	return agoo_err_set(err, AGOO_ERR_ARG, "__Type kind (%d) field not valid. %s:%d", ((gqlType)obj->ptr)->kind, __FILE__, __LINE__);
    }
    if (NULL != sel->alias) {
	key = sel->alias;
    }
    return gql_object_set(err, result, key, gql_token_create(err, kind, -1, gql_type_get("__TypeKind")));
}
type_kind(agooErr err, gqlDoc doc, gqlCobj obj, gqlField field, gqlSel sel, gqlValue result, int depth) {
    const char	*kind = NULL;
    const char	*key = sel->name;

    switch (((gqlType)obj->ptr)->kind) {
    case GQL_SCHEMA:	kind = "SCHEMA";	break;
    case GQL_OBJECT:	kind = "OBJECT";	break;
    case GQL_INPUT:	kind = "INPUT_OBJECT";	break;
    case GQL_UNION:	kind = "UNION";		break;
    case GQL_INTERFACE:	kind = "INTERFACE";	break;
    case GQL_ENUM:	kind = "ENUM";		break;
    case GQL_SCALAR:	kind = "SCALAR";	break;
    case GQL_LIST:	kind = "LIST";		break;
    case GQL_NON_NULL:	kind = "NON_NULL";	break;
    default:
	return agoo_err_set(err, AGOO_ERR_ARG, "__Type kind (%d) field not valid. %s:%d", ((gqlType)obj->ptr)->kind, __FILE__, __LINE__);
    }
    if (NULL != sel->alias) {
	key = sel->alias;
    }
    return gql_object_set(err, result, key, gql_token_create(err, kind, -1, gql_type_get("__TypeKind")));
}