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