GraphQL 2021 edition interfaces implementing interfaces
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 21.8k
- Forks
- 1.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 9
Description
Describe the bug
In the specs for the 2021 edition of GraphQL there is the possibility of defining interfaces that implemnent other interfaces: https://spec.graphql.org/October2021/#sec-Interfaces.Interfaces-Implementing-Interfaces but DGraph does not support it.
To Reproduce
Attempt to load the following schema to a DGraph node:
interface Node {
id: ID!
}
interface Resource implements Node {
id: ID!
url: String
}
type Image implements Resource & Node {
id: ID!
url: String
thumbnail: String
}
The upload (via http API) fails with the following error message:
{"errors":[{"message":"resolving updateGQLSchema failed because input:5: Unexpected Name \"implements\"\n (Locations: [{Line: 3, Column: 4}])","extensions":{"code":"Error"}}]}
Expected behavior
The schema should be valid and uploaded.
Environment
dgraph/standalone:v25.0.0-preview6 docker image
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the HTTP API schema-upload path and the GraphQL parser or validation handling for interface definitions. Reproduce the failure with the schema in the issue, then add a regression case covering an interface implementing another interface. Done means the schema uploads successfully and the existing GraphQL behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, graphql
- Domain
- api, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100