-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: async support for subgrounds (+ more) (#36)
# Features - Adds `AsyncSubgrounds` as a new client to use `async/await` with subgrounds - Adds `SubgroundsBase` as an experimental client base to be used to develop custom clients # Changes - The entirety of the transformation application has been refactored to be simplified - Subgrounds is now sans-io, where `SubgroundsBase` handles all of the buisness logic, and the implementations adds the IO work (such as making the actual request). - And much, much more ✨
- Loading branch information
Showing
32 changed files
with
1,488 additions
and
1,544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
from subgrounds.client import AsyncSubgrounds, Subgrounds | ||
from subgrounds.subgraph import FieldPath, Subgraph, SyntheticField | ||
from subgrounds.subgrounds import Subgrounds | ||
|
||
__version__ = "1.6.1" | ||
|
||
__all__ = [ | ||
"AsyncSubgrounds", | ||
"FieldPath", | ||
"Subgraph", | ||
"Subgrounds", | ||
"SyntheticField", | ||
] | ||
|
||
### Pyodide Patch ### | ||
|
||
from subgrounds.contrib import pyodide as _pyodide | ||
|
||
_pyodide.patch() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" Top-level Subgrounds subpackage | ||
This subpackage implements the top-level API that most developers will be using when | ||
querying subgraphs with Subgrounds. `Subgrounds` and `AsyncSubgrounds` contains fully | ||
implemented subgraph querying SDKs for accessing subgraph data (flattened or nested) | ||
effectively with transformation and pagination bundled in. | ||
`SubgroundsBase` provides an extended interface to build custom clients on-top allowing | ||
for intricate customization on the buisness logic subgrounds implements. | ||
""" | ||
|
||
from .async_ import AsyncSubgrounds | ||
from .base import SubgroundsBase | ||
from .sync import Subgrounds | ||
|
||
__all__ = ["AsyncSubgrounds", "Subgrounds", "SubgroundsBase"] |
Oops, something went wrong.