Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

chore: move code from galoy-client to graphql-codegen (Julian) #174

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ntheile
Copy link
Contributor

@ntheile ntheile commented Mar 22, 2023

The goal is to move away from using the Galoy client as a dependency. This is a separate package that makes graphql api calls...but it is very hard to maintain because our codebase is constantly changing. The web wallet is pinned to version 0.1.62 due to breaking changes in later versions.
https://github.com/GaloyMoney/galoy-client/tree/0.1.62/

The big idea is to remove the dependency on Galoy Client and move to the npm package @graphql-codegen
https://the-guild.dev/graphql/codegen. This lib can generate types and react hooks based on a graphql schema. This is beneficial because we can move fast and generate new types on the fly when the code base changes. It also generates useQuery hooks that will automatically query the graphql api

@ntheile
Copy link
Contributor Author

ntheile commented Mar 22, 2023

Instructions to run web wallet in readme.md, but here is the config to connect to staging:

  1. Config
    .envrc
export NODE_PATH="src/modules/default:src/"
export CUSTOM_MODULES="default"

export NODE_ENV="development"
export SESSION_KEYS="sessionkeys"
export HOST="localhost"
export PORT="3000"

export WALLET_NAME="Galoy"
export SUPPORT_EMAIL="support@galoy.io"
export SHARE_URL="https://pay.mainnet.galoy.io/"

export NETWORK="signet"
export GRAPHQL_URL="https://api.staging.galoy.io/graphql"
export GRAPHQL_SUBSCRIPTION_URL="wss://api.staging.galoy.io/graphql"
export AUTH_ENDPOINT="https://api.staging.galoy.io/api/login"
export KRATOS_API_URL="http://localhost:4433"
export KRATOS_BROWSER_URL="http://localhost:4433"
export GALOY_AUTH_ENDPOINT="https://api.staging.galoy.io/auth"
export KRATOS_FEATURE_FLAG="false"
  1. Login with phone number

@ntheile ntheile changed the title feat: julians PR feat: move code from galoy-client to graphql-codegen (Julian) Mar 22, 2023
@ntheile ntheile changed the title feat: move code from galoy-client to graphql-codegen (Julian) chore: move code from galoy-client to graphql-codegen (Julian) Mar 22, 2023
@ntheile ntheile force-pushed the julian-task branch 2 times, most recently from 6713278 to 9e0392f Compare March 23, 2023 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant