Skip to content

kizim/nexus-prisma-example-finances

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexus Prisma Examples: Finances app

Quick start

Install packages:

yarn install

Generate Photon client:

yarn generate

Start server:

yarn dev

Example API calls

{
  users {
    name
    accounts {
      name
      balance(currency: EUR)
      currency
      transactions {
        amount
      }
    }
  }
}

Sign up / sign in:

mutation signUp {
  signUp(email: "[email protected]" password: "[email protected]") {
    idToken
    user {
      id	
			email
    }
  }
}

mutation signIn {
  signIn(email: "[email protected]" password: "[email protected]") {
    idToken
    user {
      id
      email
    }
  }
}

Currenty authentificated user:

{
  me {
    id
  }
}

Create a transaction:

mutation createTransaction {
  createTransaction(data:{
    account: { connect: { id: 1 } }
    amount: 1
  }) {
    id
    account {
      balance
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published