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.22k stars 742 forks source link

Decode XML/HTML entities when taking descriptions from doc comments (XML documentation file) #7521

Closed cmeeren closed 2 weeks ago

cmeeren commented 3 weeks ago

Product

Hot Chocolate

Version

14.0.0-rc.2

Link to minimal reproduction

See below

Steps to reproduce

Repro solution: HotChocolateBugRepro.zip

Code for reference:

public class Query
{
    [GraphQLDescription("Only relevant when foo > bar.")]
    public string X => "";

    /// <summary>
    ///  Only relevant when foo > bar.
    /// </summary>
    public string Y => "";
}

What is expected?

This schema:

type Query {
  """
  Only relevant when foo > bar.
  """
  x: String!

  """
  Only relevant when foo > bar.
  """
  y: String!
}

What is actually happening?

This schema:

type Query {
  """
  Only relevant when foo > bar.
  """
  x: String!

  """
  Only relevant when foo &gt; bar.
  """
  y: String!
}

Relevant log output

No response

Additional context

No response

cmeeren commented 1 day ago

@michaelstaib, it seems this is currently only in 15.0.0 preview, and did not make the final 14.0.0 release. Will it be added to v14? Asking because FSharp.HotChocolate tests get more complicated due to this mismatch.

cmeeren commented 1 day ago

Nevermind, I was wrong. It seems this is present in both 14.0.0 and 15.0.0-p.10.