Skip to content
Discussion options

You must be logged in to vote

surrealdb/surrealdb#4921 (comment), https://cynic-rs.dev/derives/query-fragments#field-attributes
These ended up being invaluable to tackling this problem.

#[tokio::test]
async fn through_serde_json_value_sharing() {
    let gql_species = get_gql_species().await;
    let db = setup_db().await;

    for species in gql_species.clone() {
        let x = serde_json::to_value(species).unwrap();
        db.upsert(Resource::from("species"))
            .content(x)
            .await
            .unwrap();
    }

    let sql_species: surrealdb::Value = db
        .query("SELECT * FROM species")
        .await
        .unwrap()
        .take(0)
        .unwrap();
    let sql_species = sql_species.i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by djkato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant