graphql-python / graphql-python/graphql-core

Support extending interfaces

未關閉
#147 4 則留言 1 個 reaction 已指派 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 摘要。