ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.27k stars 748 forks source link

Apollo federation subgraph ExtendServiceType class not populating the values of external fields #5891

Open eldhosekp opened 1 year ago

eldhosekp commented 1 year ago

Is there an existing issue for this?

Product

Hot Chocolate

Describe the bug

Extended types values are not populated when using version 12.16.0. Using the example given for Hot Chocolate Apollo Federation(https://github.com/ChilliCream/graphql-platform/tree/12.18.0/src/HotChocolate/ApolloFederation/examples/AnnotationBased) inside the Inventory subgraph the values for price and weight are received as zero

image image

The same is working fine if the version is downgraded to 12.6.0

image image image

Steps to reproduce

  1. Run the apollo federation Annotation sample given in https://github.com/ChilliCream/graphql-platform/tree/12.18.0/src/HotChocolate/ApolloFederation/examples/AnnotationBased
  2. Run the Query query Query { topProducts { name upc price weight shippingEstimate } } 3.The value for shippingEstimate is always zero.
  3. Put a breakpoint in Inventory subgraph's Product class GetShippingEstimate method.
  4. Run the query and we can see that price and weight is always zero.
  5. Change the subgraphs to use Hot chocolate version 12.6.0`
    <PackageReference Include="HotChocolate.ApolloFederation" Version="12.6.0" />

    `

  6. Now run the query. The value for price and weight are there

Relevant log output

No response

Additional Context?

No response

Version

12.18.0

eldhosekp commented 1 year ago

The issue is there from version 12.10.0 onwards. Till version 12.9.0 there isn't any issue

michaelstaib commented 1 year ago

Thanks for providing this extra context.