-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix docs for GraphQL.NET 3.0.0 release #914
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
Conversation
@IvanGoncharov @leebyron Could you please review? GraphQL.NET received a long-awaited update to version 3.0.0 and it took a little change in the documentation. |
@sungam3r, I believe there are a few issues:
|
😕
Our own documentation http://graphql-dotnet.github.io is now updated automatically after migrating to GitHub Actions. |
site/code/index.html.js
Outdated
@@ -64,13 +71,13 @@ public class Program | |||
} | |||
"); | |||
|
|||
var json = schema.Execute(_ => | |||
var json = schema.ExecuteAsync(_ => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- var json = schema.ExecuteAsync(
+ var json = await schema.ExecuteAsync(
@sungam3r I think it's much more intuitive to use async/await. |
OK, changed. |
@sungam3r What version are you on? It does not work for me: |
You need to import a serialization library as well, such as |
OK? |
@Shane32 and @sunapi386 -- No, GraphQL.SystemTextJson is not part of the hello world code sample! Look for yourself here and here and here. The code sample does not have a |
You're correct. The documentation is wrong, both in this library, and in the graphql-dotnet project samples, for version 3.0. Keep in mind that unlike version 2.4, the json serialization library has been split off from the main project into separate nuget packages, and you will need one of them to make any practical use of the library - you'd need either In addition to the PR here to fix the sample shown here, we will need a PR in the graphql-dotnet repo to fix the file here which when published will update the documentation here. Thank you for pointing this out to us. |
Thank you. I think this will really help. |
I'm going to close this PR as these changes were manually merged upstream by @ardatan in #936 - thanks for updating the list. Note: We now have markdown files which allow for longer descriptions on the new code page: https://graphql.org/code/ - so it'd be awesome if you added some code samples etc to help any project on the page shine. |
See graphql-dotnet/graphql-dotnet#1843