gql function
Parse a GraphQL document into a DocumentNode,
automatically adding __typenames
If you want to provide your own document parser or builder,
keep in mind that default cache normalization depends heavily on __typenames,
So you should probably include an AddTypenameVistor transform
Implementation
DocumentNode gql(String document) => transform(
parseString(document),
[AddTypenameVisitor()],
);