graphql-python / graphql-python/graphql-core-legacy
`schema_printer._print_object` should return interfaces joined with '&' instead of ','
- 主要言語
- Python
- スター
- 372
- フォーク
- 175
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
https://github.com/graphql-python/graphql-core/blame/master/graphql/utils/schema_printer.py#L132
```python
def _print_object(type):
# type: (GraphQLObjectType) -> str
interfaces = type.interfaces
implemented_interfaces = (
" implements {}".format(", ".join(i.name for i in interfaces))
if interfaces
else ""
)
```
https://facebook.github.io/graphql/draft/#sec-Interfaces
```gql
type Business implements NamedEntity & ValuedEntity {
name: String
value: Int
employeeCount: Int
}
```
I do think we can use `&` instead of `,` here, so we can simply print schema to a file rather than fetching it through [graphql get-schema](https://github.com/graphql-cli/graphql-cli) in JavaScript world.
I compare both of them which was generated in my project and find the only difference, [even better with descriptions](https://github.com/graphql-python/graphql-core/issues/217).
Thanks!
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
graphql/utils/schema_printer.py を開き、参照されている行の _print_object を調べます。出力されるインターフェース構文を GraphQL ドラフトの例および graphql-cli の出力と比較します。複数のインターフェースを実装するオブジェクトに対して、schema printer が有効な SDL を出力すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100