Skip to content

[Hive Explorer] incorrectly displays subgraph owner of a field when a type is used with @external #6851

Open
@rickbijkerk

Description

@rickbijkerk

we have a setup similar to this where there's a subgraph A which defines the Product and ProductWeight type

#Subgraph A
type Product @key(fields: "id") {
    id: ID!
    weight: ProductWeight!
}

type ProductWeight  {
    weight: Int!
    // .. 
}

and a subgraph B which uses the ProductWeight data to enrich the Product type

#Subgraph B
type Product @key (fields: "id"){
    id: ID!
    weight: ProductWeight! @external
    shippingCosts: Int! @requires(fields: "weight { id }")
}


type ProductWeight @external {
    id: ID!
}

Problem:
based on the schema above i would expect hive to display Subgraph A to be the owner of the weight field on Product and all of ProductWeight fields, however in reality Hive displays Subgraph B to be the owner of the weight field and of the id field on the ProductWeight type

Expected outcome:
Hive should exclude subgraphs that have a field marked as @external when looking for the owner.

(Note: currently hive does correctly mark both subgraph A and B as owner of the ProductWeight Type which i think makes sense as it makes it easy to find usages of certain types)

If you need more info let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions