Currently, the schema-first approach does not support single line and mutliline documentation (see GraphQL Specifications from June 2018).
The following one will not work when we try to use the schema-first approach:
"""
A simple GraphQL schema which is well described.
"""
type Query {
"""
Translates a string from a given language into a different language.
"""
translate(
"The original language that `text` is provided in."
fromLanguage: Language
"The translated language to be returned."
toLanguage: Language
"The text to be translated."
text: String
): String
}
"""
The set of languages supported by `translate`.
"""
enum Language {
"English"
EN
"French"
FR
"Chinese"
CH
}
I made a little research and I didn't manage to find any .net GraphQL implementation that supports this. Is this one related to this issue? Thx you 馃檮
@RaduBuciuceanu I have taken your example and create a test with it .... the parser reads it correctly.
From what I can see in my tests is that just the enum values are missing descriptions. There seems to be a mapping issue.
"""
The set of languages supported by `translate`.
"""
enum Language {
EN
FR
CH
}
I will write a bigger test with all the types to see if the schema factory misses some more descriptions.
I will create another rc tonight 0.8.1-rc.2. We will release this 0.8.1 next week with lots of bug fixes.
@RaduBuciuceanu thanks for reporting this issue
There is the pr if you want to follow along https://github.com/ChilliCream/hotchocolate/pull/648
OK, the bug should be fixed.
Ok, this one is now fixed and under test.
I have triggered a new rc build which should be public in an hour.
https://github.com/ChilliCream/hotchocolate/releases/tag/0.8.1-rc.2
Would be great if you could give feedback on this one @RaduBuciuceanu
OK, it is public https://www.nuget.org/packages/HotChocolate/0.8.1-rc.2
@michaelstaib As I remember, when I tested it, the documentations from the GraphQL schema were ignored. Anyway, I'll try it now one more time and I'll announce here the result. By the way, thx you for responding so fast :heart:
I just tested it one more time. It worked well. Seems that, probably I was making something wrong... Anyway, I'm planning to use the _schema-first_ approach in production so, if I find something else, I'll tell you. And thx you very much for being so responsive :wink:
No prob. With version 9 we will bring lots of improvements for Schema-first
Most helpful comment
No prob. With version 9 we will bring lots of improvements for Schema-first