Skip to content

zxcfer/axum-gql-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust graphql service boilerplate

  • TODO: move to axum

Usage

Seed some data with...

cargo run --bin seed

Run the server with...

cargo run

And then test at:

http://localhost:8080/graphiql

Sample query for pets

{
  allPets(limit:4){
    pageInfo{
      startCursor
      nextCursor
      hasPreviousPage
      hasNextPage
    }
    pets{
      name
      id
      age
      petType
      gender
      owner{
        id
        username
      }
    }
    totalCount
  }
}

Sample query for owners

{
  allOwners {
    pageInfo {
      startCursor
      nextCursor
    }
    owners {
      id
      firstName
      lastName
      pets {
        id
        name
      }
    }
  }
}

About

GraphQL with Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published