Skip to content

Support for Interface Implementing Another Interface #464

@1e16miin

Description

@1e16miin

Hi,

According to the latest GraphQL specification (October 2021), an interface can now implement another interface (GraphQL Spec - Interfaces Implementing Interfaces). However, it appears that Clojure's Lacinia currently does not support this feature.

Issue

When defining an interface that implements another interface in Lacinia, it results in an error or is simply ignored. This limitation restricts the use of more advanced schema designs that are now part of the latest GraphQL specification.

For example, in a Lacinia .edn schema:

{:interfaces {:Post {:implements [:Node]
                     ...}}}

Here, :implements is intended to indicate that :Post implements the interfaces :Node. However, in the current version of Lacinia, this line has no effect. Lacinia does not process, validate, or enforce these implementations, effectively making :implements meaningless in this context.

Expected Behavior

Lacinia should allow an interface to implement another interface as per the GraphQL spec.

Actual Behavior

Lacinia throws an error or fails to handle the schema when an interface attempts to implement another interface.

Request

Please add support for interfaces implementing other interfaces to align Lacinia with the latest GraphQL specification. This enhancement would allow developers to use more flexible and advanced schema designs with Lacinia!

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions