Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseXmlDocumentation is ignored with Schema.Create #895

Closed
nigel-sampson opened this issue Jul 5, 2019 · 1 comment · Fixed by #897
Closed

UseXmlDocumentation is ignored with Schema.Create #895

nigel-sampson opened this issue Jul 5, 2019 · 1 comment · Fixed by #897
Assignees
Milestone

Comments

@nigel-sampson
Copy link
Contributor

It appears when using Schema.Create that the option UseXmlDocumentation is not respected, using SchemaBuilder.New however it is.

An example test shows the documentation being created:

[Fact]
public void CreateObjectTypeWithXmlDocumentation_IgnoreXmlDocs_SchemaCreate()
{
    // arrange
    // act
    ISchema schema = Schema.Create(c =>
    {
        c.RegisterQueryType<QueryWithDocumentation>();
        c.Options.UseXmlDocumentation = false;
    });

    // assert
    schema.ToString().MatchSnapshot();
}

gives the following snapshot

schema {
  query: QueryWithDocumentation
}

"Query Documentation."
type QueryWithDocumentation {
  "Foo Documentation-"
  foo("Bar Documentation." bar: String): String
}

"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text."
scalar String
@michaelstaib
Copy link
Member

This sounds like a bug :)

@michaelstaib michaelstaib added this to the 9.1.0 milestone Jul 5, 2019
nigel-sampson pushed a commit to nigel-sampson/hotchocolate that referenced this issue Jul 7, 2019
nigel-sampson pushed a commit to nigel-sampson/hotchocolate that referenced this issue Jul 7, 2019
nigel-sampson pushed a commit to nigel-sampson/hotchocolate that referenced this issue Jul 7, 2019
@nigel-sampson nigel-sampson self-assigned this Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants