<commit_before>using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace GraphQL.Types
{
    [DebuggerDisplay("ref {TypeName,nq}")]
    public class GraphQLTypeReference : InterfaceGraphType, IObjectGraphType
    {
        public GraphQLTypeReference(string typeName)
        {
            SetName("__GraphQLTypeReference", validate: false);
            TypeName = typeName;
        }

        public string TypeName { get; private set; }

        public Func<object, bool> IsTypeOf
        {
             get => throw Invalid();
             set => throw Invalid();
        }

        public void AddResolvedInterface(IInterfaceGraphType graphType) => throw Invalid();

        public IEnumerable<Type> Interfaces
        {
             get => throw Invalid();
             set => throw Invalid();
        }

        public IEnumerable<IInterfaceGraphType> ResolvedInterfaces
        {
            get => throw Invalid();
            set => throw Invalid();
        }

        private InvalidOperationException Invalid() => new InvalidOperationException("This is just a reference. Resolve the real type first.");

        public override bool Equals(object obj)
        {
            if (obj is GraphQLTypeReference other)
            {
                return TypeName == other.TypeName;
            }
            return base.Equals(obj);
        }

        public override int GetHashCode() => TypeName?.GetHashCode() ?? 0;
    }
}
<commit_msg>Include type name in reference error (#1429)<commit_after>using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace GraphQL.Types
{
    [DebuggerDisplay("ref {TypeName,nq}")]
    public class GraphQLTypeReference : InterfaceGraphType, IObjectGraphType
    {
        public GraphQLTypeReference(string typeName)
        {
            SetName("__GraphQLTypeReference", validate: false);
            TypeName = typeName;
        }

        public string TypeName { get; private set; }

        public Func<object, bool> IsTypeOf
        {
             get => throw Invalid();
             set => throw Invalid();
        }

        public void AddResolvedInterface(IInterfaceGraphType graphType) => throw Invalid();

        public IEnumerable<Type> Interfaces
        {
             get => throw Invalid();
             set => throw Invalid();
        }

        public IEnumerable<IInterfaceGraphType> ResolvedInterfaces
        {
            get => throw Invalid();
            set => throw Invalid();
        }

        private InvalidOperationException Invalid() => new InvalidOperationException(
            $"This is just a reference to '{TypeName}'. Resolve the real type first.");

        public override bool Equals(object obj)
        {
            if (obj is GraphQLTypeReference other)
            {
                return TypeName == other.TypeName;
            }
            return base.Equals(obj);
        }

        public override int GetHashCode() => TypeName?.GetHashCode() ?? 0;
    }
}

{'fraction_non_alphanumeric': 0.08912537412703692, 'fraction_numerical': 0.0019953441968739607, 'mean_word_length': 2.0693877551020408, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '239815', 'n_tokens_mistral': 742, 'n_tokens_neox': 719, 'n_words': 205}