We need to rename the fields in the graphQL, so we get the AST of the GraphQL firstly, and modify it as we need. However, I can't find any solution to convert the AST back to the GraphQL.
The parser I use is "GraphQL Dotnet Parser"
We need to rename the fields in the graphQL, so we get the AST of the GraphQL firstly, and modify it as we need. However, I can't find any solution to convert the AST back to the GraphQL.
The parser I use is "GraphQL Dotnet Parser"
There is a AstPrinter
class that can print out the Document
or any Ast Node.
https://github.com/graphql-dotnet/graphql-dotnet/blob/master/src/GraphQL/Utilities/AstPrinter.cs
AstPrinter.Print(…)