/// <summary>
        /// Initializes a new instance of the <see cref="FieldSelectionSet" /> class.
        /// </summary>
        /// <param name="graphType">The graph type this selection set is acting on.</param>
        /// <param name="rootPath">The document specific root path under which all fields should be nested in this selection set.</param>
        public FieldSelectionSet(IGraphType graphType, SourcePath rootPath)
        {
            this.GraphType     = Validation.ThrowIfNullOrReturn(graphType, nameof(graphType));
            _knownFieldAliases = new CharMemoryHashSet();
            _fields            = new List <FieldSelection>();

            Validation.ThrowIfNull(rootPath, nameof(rootPath));
            this.RootPath = rootPath.Clone();
        }