Giter VIP home page Giter VIP logo

syntrade-backend's People

Contributors

ariessa-deriv avatar isaiahxingwei avatar

Stargazers

 avatar

Watchers

 avatar

syntrade-backend's Issues

error in getting the correct details by user_id

Describe the bug
When query for user(user_id: 1), it responded with details for user(user_id: 4)

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    {
    user(user_id: 1) {
    user_id
    email
    password
    wallet_balance
    date_joined
    }
    }

Expected behavior
Details for user(user_id: 1) should be returned

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: chrome
  • Version: 105

error in getting all users

Describe the bug
The back-end server returns "Failed to get all users"

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    { users { user_id email password wallet_balance date_joined } }
  3. See the error

Expected behavior
The response should return all user details

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Google Chrome
  • Version: 105

error in getting the correct details by trade_id

Describe the bug
When query for trade(trade_id: 1), it responded with details for trade(trade_id: 3)

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    {
    trade(trade_id: 1) {
    trade_id
    user_id
    synthetic_type
    currency
    trade_time
    trade_type
    trade_result
    current_wallet_balance
    }
    }

Expected behavior
Details for trade(trade_id: 1) should be returned

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: chrome
  • Version: 105

wrong response from user_id query

Describe the bug
When querying for user_id: 1, the respond got is from user_id: 3 instead. Noticed that the respond gives the last data from user data every single time.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    { user(user_id: 1) { user_id email password wallet_balance date_joined } }
  3. See the user_id response

Expected behavior
It should return the specific user_id details

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: chrome
  • Version: 105

Endpoint error in buying trade

Describe the bug
It shows an error code in the response body indicating that the trade buying is unsuccessful

To Reproduce
Steps to reproduce the behavior:

  1. Open Postman
  2. Insert this query
 mutation {
    createTrade(syntheticType: "volatility_10_rise", wagerAmount: 198, optionType: "put", ticks: 4)
  }

Expected behavior
It should not show an error message

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Google Chrome
  • Version: 105

Login endpoint error

Describe the bug
The login endpoint cannot read user details

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000/
  2. Insert this query

mutation { login(email: "[email protected]", password: "Abcd123!") { email password } }
3. See the error

Expected behavior
The endpoint should be able to read the user details

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Google Chrome
  • Version: 105

Tool

  • Tested using GraphQL and Postman

error in data type for current_wallet_balance

Describe the bug
The current data type for current_wallet_balance is string

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    {
    trades {
    trade_id
    user_id
    synthetic_type
    currency
    trade_time
    trade_type
    trade_result
    current_wallet_balance
    }
    }

Expected behavior
The data type for current_wallet_balance should be float

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chrome
  • Version: 105

getting null after query trade by trade_id

Describe the bug
Does not return all details from trade (give null instead)

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    { trade(trade_id: 1) { trade_id user_id synthetic_type currency trade_time trade_type trade_result current_wallet_balance } }
  3. See the respond

Expected behavior
Return all details from trade

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chrome
  • Version: 105

Back-end server not returning JWT token

Describe the bug
The information returned are null

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000
  2. Query
    mutation { login(email: "[email protected]", password: "Abc4123!") { email, password } }
  3. See the details returned are null

Expected behavior
Back-end server should return JWT token

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Google Chrome
  • Version: 105

Error in buying trade for matches/differs

Describe the bug
It shows an error code in the response body indicating that the trade buying is unsuccessful

To Reproduce
Steps to reproduce the behavior:

  1. Open Postman
  2. Insert this query
 mutation {
    createTrade(syntheticType: "volatility_25_matches", wagerAmount: 198, optionType: "call", ticks: 7, lastDigitPrediction: 2)
  }

Expected behavior
It should not show an error message

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Google Chrome
  • Version: 105

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.