canonicalize/normalize document utility
Open
PR: feature 🚀
- Dominant language
- TypeScript
- Stars
- 20.3k
- Forks
- 2.1k
- Avg merge
- 44m
- Merged PRs (30d)
- 6
Description
# Feature requests
Would a `canonicalize(node)` or `normalize(node)` utility be a desirable feature? I started [working on one](https://github.com/micimize/graphql-to-dart/blob/5de6b0e2cf51ce1a9a049d892a0f1dbfa50aafb2/src/canonicalize.ts) to simplify some aspects of ast-based code generation, though all it does right now is merge duplicate fields
I don't think it should inline fragments or anything like that (though maybe conditionally). Maybe we'd need to spec out exactly what a canonical document form would actually look like though
Contributor guide
Assessment
This issue has not been assessed yet.