Skip to content

Query not being extended #25

Open
Open

Description

@MrSaints

It seems Graphene Federation has stopped returning an SDL with extend type Query, and instead returns type Query. I'm not sure if this is intentional, but it is not compatible with some implementations of Federation Gateway.

See diff: https://github.com/graphql-python/graphene-federation/pull/4/files#diff-3111b5ad3ddd7af276c62d4c15988d6c6f3ee13f1b6eaa87725f4fe94cc65867L42-L43

(EDIT: It seems perhaps it was never included by default)

Other Federation implementation seems to include this, e.g. gqlgen (Go): https://github.com/99designs/gqlgen/blob/2d8673a691deffe6ddd1f4d5f013a52dc91aef91/plugin/federation/federation.go#L223, Ariadne (Python) https://github.com/apollographql/apollo-federation-subgraph-compatibility/blob/1bc1ddd56c796f2a7ff9256d279c7780dd48f582/implementations/ariadne/schema.graphql#L65

Apollo docs seems to suggest it too, but to be honest, it's not too clear. Let me know what y'all think.

Activity

  1. erikwrede commented on Aug 3, 2023

    @erikwrede
    Member

    Hey there, which Federation version are you using?

  2. MrSaints commented on Aug 3, 2023

    @MrSaints
    Author

    @erikwrede I'm still on V1. But enabling V2 doesn't seem to help either.

  3. erikwrede commented on Aug 3, 2023

    @erikwrede
    Member

    AFAIK the extend is optional on type Query in Federation v2. However, we can surely add it back for both federation versions, as this should not break things. /cc @patrick91

  4. patrick91 commented on Aug 3, 2023

    @patrick91
    Member

    AFAIK the extend is optional on type Query in Federation v2. However, we can surely add it back for both federation versions, as this should not break things. /cc @patrick91

    I'd only add it for version 1, as it might be removed in future 😊

  5. erikwrede commented on Aug 3, 2023

    @erikwrede
    Member

    Makes sense. @MrSaints it might be worthwhile to open a bug report at your specific Gateway implementation. Which one are you using? 😊

  6. MrSaints commented on Aug 3, 2023

    @MrSaints
    Author

    We're using Mercurius. I believe they have one opened already tbf, so this isn't totally Graphene Federation's problem.

    mercurius-js/mercurius-gateway#23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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