Skip to content

GraphQL 2021 edition interfaces implementing interfaces #9472

@matteo-zanoni

Description

@matteo-zanoni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions