Graphene acts as Data Cache layer like open query engine.
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- graphql, python
調査の方向性
この issue では、まず着手すべきリポジトリのファイル、テスト、エントリーポイントが特定されていません。まずキャッシュのスコープ、キー設定、有効期限、ミューテーションによる無効化、親子間の更新動作を明確にする必要があります。完了には、合意された設計と、それに対応する実装およびテストが必要です。
索引モデルが issue の本文から書いたものです。
説明
Hi Team,
My name is Giang, I would like to propose a new feature for caching results on certain selected nodes with class Meta: cache = True.
I would to do data analytics on big data lake s3 using pyspark mapping spark (or other libraries) schema to graphene schema and I would like to utilize server side graphql as cache layer . In other words, I would like to treat graphql as a next custom ORM for pyspark or other dataframe libraries.
When query data, I would like to get custom field results on that node and cache it for 30 minutes (Where big data speed of access to data lake s3 does not matter, but rather than the aggregations of results)
@jkimbo cc

Cached data will need to be run when there is no cached data when query and updating when using mutation on the Node

And we also have a scheme for updating from childs to parents
import graphene
Import os
os.env[“GRAPHENE_CACHE_TIME”] = 1800
class Company(graphene.ObjectType):
class Meta:
interfaces = (relay.Node,)
cache = True
name = graphene.String()
revenue = graphene.Float()
datetime = graphene.DateTime()
if there are nested child (update all parent nodes cache)
@classmethod // cache this result on query
get_all_companies(cls, info):
return [cls(**data) for data in database.values()]
@classmethod // cache this result by different pairs of inputs on query
get_company_report_by_period(cls, info, name, period):
selected_data = [data for data in database.values() if name == data[“name”] and period in data[“datetime”]]
return {
“name”: name,
“revenue”: sum(data[“revenue”] for data in selected_data),
“datetime”: period
}
class Query(graphene.ObjectType):
get_report = graphene.List(Company)
get_company_report_period = graphene.Field(Company)
def resolve_get_report(_, info):
return Company.get_all_companies()
def resolve_get_company_report_period(_, info, name, period):
return Company.get_company_report_by_period(name, period)
database = {
“0”: {
“name”: “amazon”,
“revenue”: 1000,
“datetime”: “2021-04-01”
},
“1”: {
“name”: “amazon”,
“revenue”: 1000,
“datetime”: “2021-05-01”
},
“2”: {
“name”: “google”,
“revenue”: 1000,
“datetime”: “2021-06-01”
}
}
Kind regards
Giang
- 主要言語
- Python
- スター
- 8.2k
- フォーク
- 818
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphql-python/graphene のほかの issue
-
Tutorial mistakes オープン🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
graphql-python/graphene#1389 · コメント 5 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
graphql-python/graphene#1606 ·
-
Python 3.14 support オープン✨ enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
graphql-python/graphene#1601 · コメント 2 件 ·
-
✨ enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
graphql-python/graphene#1600 ·
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
graphql-python/graphene#1593 ·
graphql-python/graphene の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
hcocena オープンpolicies-accepted pre-review precheck-passed
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Bioconductor/BiocContributions#214 · コメント 5 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
TencentCloud/Octop#1169 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
521xueweihan/HelloGitHub#3778 ·
-
The version checker's trailing attribute region has no control for a less-than inside a quoted value オープンarea: dashboard area: tests bug perceived difficulty: 2 python
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Nitjsefnie-Harness-Commons/daedalus#1105 · コメント 1 件 ·