Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Use fishy as a crate to read schema.lock and deploy / migrate it automatically #3

@Corban-Dallas

Description

@Corban-Dallas

Hello!

I am trying to write a decentralized book library app to get familiar with p2panda. Thanks for this great protocol, I think you do amazing job.

It would be nice to have something like fishy as a create to be able to read schemas from lock file and to deploy them to node by GraphQL client or just endpoint.

For example, it would be convenient to provide predefined schema.lock within application bundle, to initialize local offline app's node with these schemas.

Something like:

use fishy;

fn initializeApplicationNode {
    // create and start node...
    // prepare GraphQL client if needed...
   
    // Create LockFile
    // from path
    let path = Path::from("schema.lock");
    let lock_file = LockFile::from(path).unwrap();
    // from String
    let file_content = String::from("...readed content...");
    let lock_file = LockFile::from(file_content).unwrap();

    // import schema
    let schema: Vec<Schema> = lock_file.to_schema().ok();

    // Deploy
    fishy::deploy_lock_file(lock_file, client).ok();
    fishy::deploy_schema(schema, client).ok();
}

or may be something different but doing same job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions