public static DocumentNode Rewrite(DocumentNode document, ISchema schema)
        {
            if (document is null)
            {
                throw new ArgumentNullException(nameof(document));
            }

            if (schema is null)
            {
                throw new ArgumentNullException(nameof(schema));
            }

            DocumentNode current = document;

            current = EntityIdRewriter.Rewrite(current, schema);
            current = TypeNameQueryRewriter.Rewrite(current);
            return(RemoveClientDirectivesRewriter.Rewrite(current));
        }
        public static DocumentNode Rewrite(DocumentNode document)
        {
            var rewriter = new RemoveClientDirectivesRewriter();

            return(rewriter.RewriteDocument(document, null));
        }