graphql-python / graphql-python/flask-graphql

Configuration Options for shape of Batch GraphQL Return JSON

未關閉
#47 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
1.3k
分支
139
PR 合併指標
30 天內沒有已合併 PR

描述

Awesome project you got going here, thanks for keeping this going. I've been using the batch option to allow for batch-GraphQL requests from ApolloClient, but it doesn't seem like there is an easy way to specify what shape I want the data to return in? Correct me if I'm wrong.

For example, currently when sending batch-requests, I get back a JSON array with the data I am interested in nested under a "data" key which is itself nested in a "payload" key.

[
    {"payload":
        {"data":
            {<some_data_stuff_here}
        }
    },
    {"payload":
        {"data":
            {<some_data_stuff_here}
        }
    },
    {"payload":
        {"data":
            {<some_data_stuff_here}
        }
    }
]

I'm hoping I can just get these objects sent back without the data nested in the payload key. Any suggestions? Thanks in advance.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

該 issue 未指定任何檔案或測試。首先追蹤 batch 選項及其 GraphQL 回應處理,以 ApolloClient 範例和目前的 payload 結構作為起始行為;當呼叫端可以設定回應巢狀結構並接收到所要求的 JSON 結構時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
flask, python
領域
api, backend
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。