Skip to content

Federated Entity type removed from executable schema #442

Closed
@danilo-barboza

Description

@danilo-barboza

Background & Description

First of all, thank you all for the great lib! It is great to see such a mature Schema First library for GraphQL in Java, I'm really enjoying working with it.

I'm trying to use graphql-java-tools with federation-jvm and overall it works great.

However, I'm facing one issue where we have a service which defines its own query, but also extends one entity to add fields to it. Like the schema here.

The root of the issue is that graphql-java-tools ignores the User type because it is "orphan" as it is not referenced by any other type in the schema. However, this is a completely valid scenario, and would be great if graphql-java-tools could support it.

How to reproduce

I've created a simple project reproducing the issue: https://github.com/danilo-barboza/apollo-federation-java-tools/

Just clone it and run

./gradlew test

Possible solutions

I've also hacked hard and created a draft Pull Request to show a possible way to fix it: #441. The main idea is to make sure we add types that have the @extends annotation.

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