Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Squid Client #1495

Open
danielsimao opened this issue Jul 31, 2023 · 0 comments
Open

Create Squid Client #1495

danielsimao opened this issue Jul 31, 2023 · 0 comments

Comments

@danielsimao
Copy link
Member

danielsimao commented Jul 31, 2023

Is your feature request related to a problem? Please describe.
We should aggregate all queries in one place so they are easier to maintain and also easy to mock

Describe the solution you'd like
A GraphQLClient class that would have a field for each module. A module could be LoanService a class that contains for example a getUserEarnings

class GraphQLClient {
 constructor() {
   loans = new LoanService(...)
 }
loans: LoanService
}
class LoanService {
 constructor(graphQLClient: any) {
...
}

 getUserEarnings: async () => graphQLClient.request(SOME_QUERY)
}
@nud3l nud3l added this to Backlog Jul 31, 2023
@github-project-automation github-project-automation bot moved this to New 🆕 in Backlog Jul 31, 2023
@danielsimao danielsimao changed the title Create GraphQL Service Create Custom GraphQL Client Jul 31, 2023
@danielsimao danielsimao changed the title Create Custom GraphQL Client Create Squid Client Jul 31, 2023
@nud3l nud3l moved this from New 🆕 to Todo ⏳ in Backlog Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant