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

Generating typing for subgraphs #41

Open
1 task
0xMochan opened this issue Aug 18, 2023 · 2 comments
Open
1 task

Generating typing for subgraphs #41

0xMochan opened this issue Aug 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@0xMochan
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I want type information when using subgraph and fieldpath objects.

Describe the solution you'd like
Generating .pyi files for full type information, likely thru a CLI command in contrib.

Describe alternatives you've considered

  • Using notebooks
    • Large projects are easier with packages

Additional context
Likely would be a tall ordering and would only work on CLI or first time .load_subgraph is invoked.

Implementation checklist

  • Task 1
@0xMochan 0xMochan added the enhancement New feature or request label Aug 18, 2023
@0xMochan
Copy link
Collaborator Author

0xMochan commented Aug 18, 2023

CC @Evan-Kim2028

@gabrielfior
Copy link
Contributor

I would also be interested in this - namely to auto-generate Python classes from a given subgraph after loading.

I'm trying this (without success)

$ UNISWAP_SUBGRAPH = 'https://api.thegraph.com/subgraphs/name/messari/aave-v2-ethereum' 
$ a = sg.load_subgraph(UNISWAP_SUBGRAPH, True)

Error:

    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants