graphql-python / graphql-python/graphql-core

Support extending interfaces

オープン
#147 コメント 4 件 リアクション 1 件 担当者 1 名 @Cito が担当を希望しています GitHub で見る
question
主要言語
Python
スター
531
フォーク
146
PR マージ指標
30日以内にマージされた PR はありません

説明

# Reporting issues with GraphQL-core 3

The GraphQL protocol already supports interfaces extending other interfaces like
```graphql
interface Identifiable {
id: ID!
}

interface Resource implements Identifiable {
id: ID!
name: String!
}

type SomeResource implements Resource {
id: ID!
name: String!
}
```

When loading the schema we get an error
```
File "/usr/local/lib/python3.6/site-packages/graphql/type/validate.py", line 91, in assert_valid_schema
raise TypeError("\n\n".join(error.message for error in errors))
TypeError: Type SomeResource must implement Identifiable because it is implemented by Resource.
```
This can be solved by doing
```graphql
type SomeResource implements Resource & Identifiable {
id: ID!
name: String
}
```
But its a bit annoying

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。