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

API: Write v3 subgraph client #47

Closed
kkennis opened this issue Mar 31, 2021 · 2 comments
Closed

API: Write v3 subgraph client #47

kkennis opened this issue Mar 31, 2021 · 2 comments
Assignees
Labels

Comments

@kkennis
Copy link
Contributor

kkennis commented Mar 31, 2021

Once #42 is completed, we will know the query interface for our subgraph. Even before the subgraph is deployed, we should use these definitions to write our API client for the subgraph. This client should be responsible for querying the subgraph and transforming the data (if necessary) into the data types defined in #46.

This should follow a similar pattern to the v2 client described in packages/server/src/services/uniswap.ts.

In other words, it should:

  • Be scoped to a single file
  • Export a stateless query interface
  • Define query API for each data type, including query parameters (limits/timestamps)
  • Support the same queries as the V2 subgraph
  • Do basic error handling (handle non-success status codes or malformed responses and throw errors)

In the future, we may expand or modify the queries, but getting to feature parity with V2 is a good place to start.

Acceptance Criteria:

  • File packages/server/src/services/uniswap-v3.ts exists in the API codebase
  • V3 integration exposes same API as v2 service
  • All queries to the V3 subgraph implemented
@kkennis
Copy link
Contributor Author

kkennis commented Apr 15, 2021

@khcoaching
Copy link
Contributor

Completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants